<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998


Loading interface files
-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE CPP, BangPatterns, RecordWildCards, NondecreasingIndentation #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# OPTIONS_GHC -fno-warn-orphans #-}</span><span>
</span><span id="line-12"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Iface.Load</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-13"></span><span>        </span><span class="hs-comment">-- Importing one thing</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#tcLookupImported_maybe"><span class="hs-identifier">tcLookupImported_maybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#importDecl"><span class="hs-identifier">importDecl</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#checkWiredInTyCon"><span class="hs-identifier">checkWiredInTyCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#ifCheckWiredInThing"><span class="hs-identifier">ifCheckWiredInThing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>        </span><span class="hs-comment">-- RnM/TcM functions</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#loadModuleInterface"><span class="hs-identifier">loadModuleInterface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadModuleInterfaces"><span class="hs-identifier">loadModuleInterfaces</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#loadSrcInterface"><span class="hs-identifier">loadSrcInterface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadSrcInterface_maybe"><span class="hs-identifier">loadSrcInterface_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceForName"><span class="hs-identifier">loadInterfaceForName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceForNameMaybe"><span class="hs-identifier">loadInterfaceForNameMaybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceForModule"><span class="hs-identifier">loadInterfaceForModule</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>        </span><span class="hs-comment">-- IfM functions</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier">loadInterface</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier">loadSysInterface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadUserInterface"><span class="hs-identifier">loadUserInterface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadPluginInterface"><span class="hs-identifier">loadPluginInterface</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#findAndReadIface"><span class="hs-identifier">findAndReadIface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#readIface"><span class="hs-identifier">readIface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#writeIface"><span class="hs-identifier">writeIface</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#loadDecls"><span class="hs-identifier">loadDecls</span></a></span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- Should move to GHC.IfaceToCore and be renamed</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#initExternalPackageState"><span class="hs-identifier">initExternalPackageState</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#moduleFreeHolesPrecise"><span class="hs-identifier">moduleFreeHolesPrecise</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#needWiredInHomeIface"><span class="hs-identifier">needWiredInHomeIface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#loadWiredInHomeIface"><span class="hs-identifier">loadWiredInHomeIface</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#pprModIfaceSimple"><span class="hs-identifier">pprModIfaceSimple</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Iface.Load.html#ifaceStats"><span class="hs-identifier">ifaceStats</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#pprModIface"><span class="hs-identifier">pprModIface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html#showIface"><span class="hs-identifier">showIface</span></a></span><span>
</span><span id="line-33"></span><span>   </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html"><span class="hs-identifier">GHC.IfaceToCore</span></a></span><span>
</span><span id="line-40"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html#tcIfaceDecl"><span class="hs-identifier">tcIfaceDecl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html#tcIfaceRules"><span class="hs-identifier">tcIfaceRules</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html#tcIfaceInst"><span class="hs-identifier">tcIfaceInst</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html#tcIfaceFamInst"><span class="hs-identifier">tcIfaceFamInst</span></a></span><span>
</span><span id="line-41"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html#tcIfaceAnnotations"><span class="hs-identifier">tcIfaceAnnotations</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IfaceToCore.html#tcIfaceCompleteSigs"><span class="hs-identifier">tcIfaceCompleteSigs</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Hooks.html"><span class="hs-identifier">GHC.Driver.Hooks</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html"><span class="hs-identifier">GHC.Driver.Plugins</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html"><span class="hs-identifier">GHC.Iface.Syntax</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Env.html"><span class="hs-identifier">GHC.Iface.Env</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#SuccessFlag"><span class="hs-identifier">SuccessFlag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Monad.html"><span class="hs-identifier">GHC.Tc.Utils.Monad</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html#BinData"><span class="hs-identifier">BinData</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Settings.Constants.html"><span class="hs-identifier">GHC.Settings.Constants</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Utils.html"><span class="hs-identifier">GHC.Builtin.Utils</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html"><span class="hs-identifier">GHC.Builtin.PrimOps</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier">allThePrimOps</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html#primOpFixity"><span class="hs-identifier">primOpFixity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html#primOpOcc"><span class="hs-identifier">primOpOcc</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html"><span class="hs-identifier">GHC.Types.Id.Make</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier">seqId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.ConstantFold.html#EnableBignumRules"><span class="hs-identifier">EnableBignumRules</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Rules.html"><span class="hs-identifier">GHC.Core.Rules</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Annotations.html"><span class="hs-identifier">GHC.Types.Annotations</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.InstEnv.html"><span class="hs-identifier">GHC.Core.InstEnv</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html"><span class="hs-identifier">GHC.Core.FamInstEnv</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html"><span class="hs-identifier">GHC.Types.Name.Env</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html"><span class="hs-identifier">GHC.Types.Avail</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.State.html"><span class="hs-identifier">GHC.Unit.State</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Finder.html"><span class="hs-identifier">GHC.Driver.Finder</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Binary.html"><span class="hs-identifier">GHC.Iface.Binary</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html"><span class="hs-identifier">GHC.Utils.Panic</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Fingerprint.html"><span class="hs-identifier">GHC.Utils.Fingerprint</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html"><span class="hs-identifier">GHC.Types.FieldLabel</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Rename.html"><span class="hs-identifier">GHC.Iface.Rename</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.DSet.html"><span class="hs-identifier">GHC.Types.Unique.DSet</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.IORef.html#"><span class="hs-identifier">Data.IORef</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier">toList</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
*      tcImportDecl is the key function for &quot;faulting in&quot;              *
*      imported things
*                                                                      *
************************************************************************

The main idea is this.  We are chugging along type-checking source code, and
find a reference to GHC.Base.map.  We call tcLookupGlobal, which doesn't find
it in the EPS type envt.  So it
        1 loads GHC.Base.hi
        2 gets the decl for GHC.Base.map
        3 typechecks it via tcIfaceDecl
        4 and adds it to the type env in the EPS

Note that DURING STEP 4, we may find that map's type mentions a type
constructor that also

Notice that for imported things we read the current version from the EPS
mutable variable.  This is important in situations like
        ...$(e1)...$(e2)...
where the code that e1 expands to might import some defns that
also turn out to be needed by the code that e2 expands to.
-}</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="annot"><a href="GHC.Iface.Load.html#tcLookupImported_maybe"><span class="hs-identifier hs-type">tcLookupImported_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- Returns (Failed err) if we can't find the interface file for the thing</span><span>
</span><span id="line-120"></span><span id="tcLookupImported_maybe"><span class="annot"><span class="annottext">tcLookupImported_maybe :: Name -&gt; TcM (MaybeErr MsgDoc TyThing)
</span><a href="GHC.Iface.Load.html#tcLookupImported_maybe"><span class="hs-identifier hs-var hs-var">tcLookupImported_maybe</span></a></span></span><span> </span><span id="local-6989586621681085042"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085042"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-121"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681085041"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681085041"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf TcGblEnv TcLclEnv HscEnv
forall gbl lcl. TcRnIf gbl lcl HscEnv
</span><a href="GHC.Tc.Utils.Monad.html#getTopEnv"><span class="hs-identifier hs-var">getTopEnv</span></a></span><span>
</span><span id="line-122"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681085039"><span class="annot"><span class="annottext">Maybe TyThing
</span><a href="#local-6989586621681085039"><span class="hs-identifier hs-var">mb_thing</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (Maybe TyThing) -&gt; IOEnv (Env TcGblEnv TcLclEnv) (Maybe TyThing)
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; Name -&gt; IO (Maybe TyThing)
</span><a href="GHC.Driver.Types.html#lookupTypeHscEnv"><span class="hs-identifier hs-var">lookupTypeHscEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681085041"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085042"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe TyThing
</span><a href="#local-6989586621681085039"><span class="hs-identifier hs-var">mb_thing</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-124"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681085036"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681085036"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc TyThing -&gt; TcM (MaybeErr MsgDoc TyThing)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; MaybeErr MsgDoc TyThing
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681085036"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span>            </span><span class="annot"><span class="annottext">Maybe TyThing
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; TcM (MaybeErr MsgDoc TyThing)
</span><a href="GHC.Iface.Load.html#tcImportDecl_maybe"><span class="hs-identifier hs-var">tcImportDecl_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085042"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Iface.Load.html#tcImportDecl_maybe"><span class="hs-identifier hs-type">tcImportDecl_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- Entry point for *source-code* uses of importDecl</span><span>
</span><span id="line-129"></span><span id="tcImportDecl_maybe"><span class="annot"><span class="annottext">tcImportDecl_maybe :: Name -&gt; TcM (MaybeErr MsgDoc TyThing)
</span><a href="GHC.Iface.Load.html#tcImportDecl_maybe"><span class="hs-identifier hs-var hs-var">tcImportDecl_maybe</span></a></span></span><span> </span><span id="local-6989586621681085033"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085033"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681085032"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681085032"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe TyThing
</span><a href="GHC.Types.Name.html#wiredInNameTyThing_maybe"><span class="hs-identifier hs-var">wiredInNameTyThing_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085033"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; Bool
</span><a href="GHC.Iface.Load.html#needWiredInHomeIface"><span class="hs-identifier hs-var">needWiredInHomeIface</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681085032"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfG () -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfG ()
forall lcl. Name -&gt; IfM lcl ()
</span><a href="GHC.Iface.Load.html#loadWiredInHomeIface"><span class="hs-identifier hs-var">loadWiredInHomeIface</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085033"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>                </span><span class="hs-comment">-- See Note [Loading instances for wired-in things]</span><span>
</span><span id="line-134"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc TyThing -&gt; TcM (MaybeErr MsgDoc TyThing)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; MaybeErr MsgDoc TyThing
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681085032"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-136"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfG (MaybeErr MsgDoc TyThing) -&gt; TcM (MaybeErr MsgDoc TyThing)
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfG (MaybeErr MsgDoc TyThing)
forall lcl. Name -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
</span><a href="GHC.Iface.Load.html#importDecl"><span class="hs-identifier hs-var">importDecl</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085033"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span id="local-6989586621681085556"><span class="annot"><a href="GHC.Iface.Load.html#importDecl"><span class="hs-identifier hs-type">importDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085556"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-139"></span><span class="hs-comment">-- Get the TyThing for this Name from an interface file</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- It's not a wired-in thing -- the caller caught that</span><span>
</span><span id="line-141"></span><span id="importDecl"><span class="annot"><span class="annottext">importDecl :: forall lcl. Name -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
</span><a href="GHC.Iface.Load.html#importDecl"><span class="hs-identifier hs-var hs-var">importDecl</span></a></span></span><span> </span><span id="local-6989586621681085008"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-142"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isWiredInName</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>    </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf IfGblEnv lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681085001"><span class="hs-identifier hs-var">nd_doc</span></a></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-comment">-- Load the interface, which should populate the PTE</span><span>
</span><span id="line-146"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681085000"><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
</span><a href="#local-6989586621681085000"><span class="hs-identifier hs-var">mb_iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>                      </span><span class="annot"><span class="annottext">MsgDoc
-&gt; Module
-&gt; WhereFrom
-&gt; IOEnv (Env IfGblEnv lcl) (MaybeErr MsgDoc ModIface)
forall lcl.
MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681085001"><span class="hs-identifier hs-var">nd_doc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportBySystem"><span class="hs-identifier hs-var">ImportBySystem</span></a></span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
</span><a href="#local-6989586621681085000"><span class="hs-identifier hs-var">mb_iface</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-149"></span><span>                </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084993"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084993"><span class="hs-identifier hs-var">err_msg</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc TyThing
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084993"><span class="hs-identifier hs-var">err_msg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">;</span><span>
</span><span id="line-150"></span><span>                </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-comment">-- Now look it up again; this time we should find it</span><span>
</span><span id="line-153"></span><span>        </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084992"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084992"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf IfGblEnv lcl ExternalPackageState
forall gbl lcl. TcRnIf gbl lcl ExternalPackageState
</span><a href="GHC.Tc.Utils.Monad.html#getEps"><span class="hs-identifier hs-var">getEps</span></a></span><span>
</span><span id="line-154"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TypeEnv -&gt; Name -&gt; Maybe TyThing
</span><a href="GHC.Driver.Types.html#lookupTypeEnv"><span class="hs-identifier hs-var">lookupTypeEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var hs-var">eps_PTE</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084992"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-155"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084988"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084988"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing))
-&gt; MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; MaybeErr MsgDoc TyThing
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084988"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-156"></span><span>            </span><span class="annot"><span class="annottext">Maybe TyThing
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084987"><span class="annot"><span class="annottext">doc :: MsgDoc
</span><a href="#local-6989586621681084987"><span class="hs-identifier hs-var hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#whenPprDebug"><span class="hs-identifier hs-var">whenPprDebug</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; MsgDoc
</span><a href="#local-6989586621681084985"><span class="hs-identifier hs-var">found_things_msg</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084992"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>                                    </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084982"><span class="hs-identifier hs-var">not_found_msg</span></a></span><span>
</span><span id="line-158"></span><span>                          </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing))
-&gt; MaybeErr MsgDoc TyThing -&gt; IfM lcl (MaybeErr MsgDoc TyThing)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc TyThing
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084987"><span class="hs-identifier hs-var">doc</span></a></span><span>
</span><span id="line-159"></span><span>    </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-160"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-161"></span><span>    </span><span id="local-6989586621681085001"><span class="annot"><span class="annottext">nd_doc :: MsgDoc
</span><a href="#local-6989586621681085001"><span class="hs-identifier hs-var hs-var">nd_doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Need decl for&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-162"></span><span>    </span><span id="local-6989586621681084982"><span class="annot"><span class="annottext">not_found_msg :: MsgDoc
</span><a href="#local-6989586621681084982"><span class="hs-identifier hs-var hs-var">not_found_msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't find interface-file declaration for&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-163"></span><span>                                </span><span class="annot"><span class="annottext">NameSpace -&gt; MsgDoc
</span><a href="GHC.Types.Name.Occurrence.html#pprNameSpace"><span class="hs-identifier hs-var">pprNameSpace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; NameSpace
</span><a href="GHC.Types.Name.html#nameNameSpace"><span class="hs-identifier hs-var">nameNameSpace</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>                       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Probable cause: bug in .hi-boot file, or inconsistent .hi file&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-165"></span><span>                                </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use -ddump-if-trace to get an idea of which file caused the error&quot;</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>    </span><span id="local-6989586621681084985"><span class="annot"><span class="annottext">found_things_msg :: ExternalPackageState -&gt; MsgDoc
</span><a href="#local-6989586621681084985"><span class="hs-identifier hs-var hs-var">found_things_msg</span></a></span></span><span> </span><span id="local-6989586621681084975"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084975"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-167"></span><span>        </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Found the following declarations in&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>           </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(TyThing -&gt; MsgDoc) -&gt; [TyThing] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">([TyThing] -&gt; [MsgDoc]) -&gt; [TyThing] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(TyThing -&gt; Bool) -&gt; [TyThing] -&gt; [TyThing]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; Bool
</span><a href="#local-6989586621681084972"><span class="hs-identifier hs-var">is_interesting</span></a></span><span> </span><span class="annot"><span class="annottext">([TyThing] -&gt; [TyThing]) -&gt; [TyThing] -&gt; [TyThing]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TypeEnv -&gt; [TyThing]
forall a. NameEnv a -&gt; [a]
</span><a href="GHC.Types.Name.Env.html#nameEnvElts"><span class="hs-identifier hs-var">nameEnvElts</span></a></span><span> </span><span class="annot"><span class="annottext">(TypeEnv -&gt; [TyThing]) -&gt; TypeEnv -&gt; [TyThing]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState -&gt; TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var hs-var">eps_PTE</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084975"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-170"></span><span>        </span><span id="local-6989586621681084972"><span class="annot"><span class="annottext">is_interesting :: TyThing -&gt; Bool
</span><a href="#local-6989586621681084972"><span class="hs-identifier hs-var hs-var">is_interesting</span></a></span></span><span> </span><span id="local-6989586621681084970"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084970"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681085008"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084970"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
           Checks for wired-in things
*                                                                      *
************************************************************************

Note [Loading instances for wired-in things]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We need to make sure that we have at least *read* the interface files
for any module with an instance decl or RULE that we might want.

* If the instance decl is an orphan, we have a whole separate mechanism
  (loadOrphanModules)

* If the instance decl is not an orphan, then the act of looking at the
  TyCon or Class will force in the defining module for the
  TyCon/Class, and hence the instance decl

* BUT, if the TyCon is a wired-in TyCon, we don't really need its interface;
  but we must make sure we read its interface in case it has instances or
  rules.  That is what GHC.Iface.Load.loadWiredInHomeIface does.  It's called
  from GHC.IfaceToCore.{tcImportDecl, checkWiredInTyCon, ifCheckWiredInThing}

* HOWEVER, only do this for TyCons.  There are no wired-in Classes.  There
  are some wired-in Ids, but we don't want to load their interfaces. For
  example, Control.Exception.Base.recSelError is wired in, but that module
  is compiled late in the base library, and we don't want to force it to
  load before it's been compiled!

All of this is done by the type checker. The renamer plays no role.
(It used to, but no longer.)
-}</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="annot"><a href="GHC.Iface.Load.html#checkWiredInTyCon"><span class="hs-identifier hs-type">checkWiredInTyCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- Ensure that the home module of the TyCon (and hence its instances)</span><span>
</span><span id="line-209"></span><span class="hs-comment">-- are loaded. See Note [Loading instances for wired-in things]</span><span>
</span><span id="line-210"></span><span class="hs-comment">-- It might not be a wired-in tycon (see the calls in GHC.Tc.Utils.Unify),</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- in which case this is a no-op.</span><span>
</span><span id="line-212"></span><span id="checkWiredInTyCon"><span class="annot"><span class="annottext">checkWiredInTyCon :: TyCon -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Iface.Load.html#checkWiredInTyCon"><span class="hs-identifier hs-var hs-var">checkWiredInTyCon</span></a></span></span><span> </span><span id="local-6989586621681084968"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681084968"><span class="hs-identifier hs-var">tc</span></a></span></span><span>
</span><span id="line-213"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-var">isWiredInName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084967"><span class="hs-identifier hs-var">tc_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-215"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-216"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084966"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084966"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) Module
forall (m :: * -&gt; *). HasModule m =&gt; m Module
</span><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier hs-var">getModule</span></a></span><span>
</span><span id="line-217"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;checkWiredInTyCon&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084967"><span class="hs-identifier hs-var">tc_name</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084966"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">tc_name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>          </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084966"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084967"><span class="hs-identifier hs-var">tc_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfG () -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfG ()
forall lcl. Name -&gt; IfM lcl ()
</span><a href="GHC.Iface.Load.html#loadWiredInHomeIface"><span class="hs-identifier hs-var">loadWiredInHomeIface</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084967"><span class="hs-identifier hs-var">tc_name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-221"></span><span>                </span><span class="hs-comment">-- Don't look for (non-existent) Float.hi when</span><span>
</span><span id="line-222"></span><span>                </span><span class="hs-comment">-- compiling Float.hs, which mentions Float of course</span><span>
</span><span id="line-223"></span><span>                </span><span class="hs-comment">-- A bit yukky to call initIfaceTcRn here</span><span>
</span><span id="line-224"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-225"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-226"></span><span>    </span><span id="local-6989586621681084967"><span class="annot"><span class="annottext">tc_name :: Name
</span><a href="#local-6989586621681084967"><span class="hs-identifier hs-var hs-var">tc_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681084968"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="annot"><a href="GHC.Iface.Load.html#ifCheckWiredInThing"><span class="hs-identifier hs-type">ifCheckWiredInThing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfL"><span class="hs-identifier hs-type">IfL</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- Even though we are in an interface file, we want to make</span><span>
</span><span id="line-230"></span><span class="hs-comment">-- sure the instances of a wired-in thing are loaded (imagine f :: Double -&gt; Double)</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- Ditto want to ensure that RULES are loaded too</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- See Note [Loading instances for wired-in things]</span><span>
</span><span id="line-233"></span><span id="ifCheckWiredInThing"><span class="annot"><span class="annottext">ifCheckWiredInThing :: TyThing -&gt; IfL ()
</span><a href="GHC.Iface.Load.html#ifCheckWiredInThing"><span class="hs-identifier hs-var hs-var">ifCheckWiredInThing</span></a></span></span><span> </span><span id="local-6989586621681084962"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084962"><span class="hs-identifier hs-var">thing</span></a></span></span><span>
</span><span id="line-234"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084961"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084961"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IfL Module
</span><a href="GHC.Tc.Utils.Monad.html#getIfModule"><span class="hs-identifier hs-var">getIfModule</span></a></span><span>
</span><span id="line-235"></span><span>                </span><span class="hs-comment">-- Check whether we are typechecking the interface for this</span><span>
</span><span id="line-236"></span><span>                </span><span class="hs-comment">-- very module.  E.g when compiling the base library in --make mode</span><span>
</span><span id="line-237"></span><span>                </span><span class="hs-comment">-- we may typecheck GHC.Base.hi. At that point, GHC.Base is not in</span><span>
</span><span id="line-238"></span><span>                </span><span class="hs-comment">-- the HPT, so without the test we'll demand-load it into the PIT!</span><span>
</span><span id="line-239"></span><span>                </span><span class="hs-comment">-- C.f. the same test in checkWiredInTyCon above</span><span>
</span><span id="line-240"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084959"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621681084959"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084962"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; IfL () -&gt; IfL ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; Bool
</span><a href="GHC.Iface.Load.html#needWiredInHomeIface"><span class="hs-identifier hs-var">needWiredInHomeIface</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084962"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084961"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084959"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfL ()
forall lcl. Name -&gt; IfM lcl ()
</span><a href="GHC.Iface.Load.html#loadWiredInHomeIface"><span class="hs-identifier hs-var">loadWiredInHomeIface</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084959"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.Iface.Load.html#needWiredInHomeIface"><span class="hs-identifier hs-type">needWiredInHomeIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- Only for TyCons; see Note [Loading instances for wired-in things]</span><span>
</span><span id="line-247"></span><span id="needWiredInHomeIface"><span class="annot"><span class="annottext">needWiredInHomeIface :: TyThing -&gt; Bool
</span><a href="GHC.Iface.Load.html#needWiredInHomeIface"><span class="hs-identifier hs-var hs-var">needWiredInHomeIface</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ATyCon"><span class="hs-identifier hs-type">ATyCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-248"></span><span class="annot"><a href="GHC.Iface.Load.html#needWiredInHomeIface"><span class="hs-identifier hs-var">needWiredInHomeIface</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
        loadSrcInterface, loadOrphanModules, loadInterfaceForName

                These three are called from TcM-land
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="hs-comment">-- | Load the interface corresponding to an @import@ directive in</span><span>
</span><span id="line-262"></span><span class="hs-comment">-- source code.  On a failure, fail in the monad with an error message.</span><span>
</span><span id="line-263"></span><span class="annot"><a href="GHC.Iface.Load.html#loadSrcInterface"><span class="hs-identifier hs-type">loadSrcInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-264"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-265"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#IsBootInterface"><span class="hs-identifier hs-type">IsBootInterface</span></a></span><span>     </span><span class="hs-comment">-- {-# SOURCE #-} ?</span><span>
</span><span id="line-266"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>    </span><span class="hs-comment">-- &quot;package&quot;, if any</span><span>
</span><span id="line-267"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span id="loadSrcInterface"><span class="annot"><span class="annottext">loadSrcInterface :: MsgDoc
-&gt; ModuleName
-&gt; IsBootInterface
-&gt; Maybe FastString
-&gt; RnM ModIface
</span><a href="GHC.Iface.Load.html#loadSrcInterface"><span class="hs-identifier hs-var hs-var">loadSrcInterface</span></a></span></span><span> </span><span id="local-6989586621681084956"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084956"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084955"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681084955"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681084954"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084954"><span class="hs-identifier hs-var">want_boot</span></a></span></span><span> </span><span id="local-6989586621681084953"><span class="annot"><span class="annottext">Maybe FastString
</span><a href="#local-6989586621681084953"><span class="hs-identifier hs-var">maybe_pkg</span></a></span></span><span>
</span><span id="line-270"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084952"><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
</span><a href="#local-6989586621681084952"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MsgDoc
-&gt; ModuleName
-&gt; IsBootInterface
-&gt; Maybe FastString
-&gt; RnM (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadSrcInterface_maybe"><span class="hs-identifier hs-var">loadSrcInterface_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084956"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681084955"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084954"><span class="hs-identifier hs-var">want_boot</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FastString
</span><a href="#local-6989586621681084953"><span class="hs-identifier hs-var">maybe_pkg</span></a></span><span>
</span><span id="line-271"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
</span><a href="#local-6989586621681084952"><span class="hs-identifier hs-var">res</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-272"></span><span>           </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084951"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084951"><span class="hs-identifier hs-var">err</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; RnM ModIface
forall a. MsgDoc -&gt; TcM a
</span><a href="GHC.Tc.Utils.Monad.html#failWithTc"><span class="hs-identifier hs-var">failWithTc</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084951"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-273"></span><span>           </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span id="local-6989586621681084949"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084949"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; RnM ModIface
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084949"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span class="hs-comment">-- | Like 'loadSrcInterface', but returns a 'MaybeErr'.</span><span>
</span><span id="line-276"></span><span class="annot"><a href="GHC.Iface.Load.html#loadSrcInterface_maybe"><span class="hs-identifier hs-type">loadSrcInterface_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-277"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-278"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#IsBootInterface"><span class="hs-identifier hs-type">IsBootInterface</span></a></span><span>     </span><span class="hs-comment">-- {-# SOURCE #-} ?</span><span>
</span><span id="line-279"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>    </span><span class="hs-comment">-- &quot;package&quot;, if any</span><span>
</span><span id="line-280"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span id="loadSrcInterface_maybe"><span class="annot"><span class="annottext">loadSrcInterface_maybe :: MsgDoc
-&gt; ModuleName
-&gt; IsBootInterface
-&gt; Maybe FastString
-&gt; RnM (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadSrcInterface_maybe"><span class="hs-identifier hs-var hs-var">loadSrcInterface_maybe</span></a></span></span><span> </span><span id="local-6989586621681084948"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084948"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084947"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681084947"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681084946"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084946"><span class="hs-identifier hs-var">want_boot</span></a></span></span><span> </span><span id="local-6989586621681084945"><span class="annot"><span class="annottext">Maybe FastString
</span><a href="#local-6989586621681084945"><span class="hs-identifier hs-var">maybe_pkg</span></a></span></span><span>
</span><span id="line-283"></span><span>  </span><span class="hs-comment">-- We must first find which Module this import refers to.  This involves</span><span>
</span><span id="line-284"></span><span>  </span><span class="hs-comment">-- calling the Finder, which as a side effect will search the filesystem</span><span>
</span><span id="line-285"></span><span>  </span><span class="hs-comment">-- and create a ModLocation.  If successful, loadIface will read the</span><span>
</span><span id="line-286"></span><span>  </span><span class="hs-comment">-- interface; it will call the Finder again, but the ModLocation will be</span><span>
</span><span id="line-287"></span><span>  </span><span class="hs-comment">-- cached from the first search.</span><span>
</span><span id="line-288"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084944"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084944"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf TcGblEnv TcLclEnv HscEnv
forall gbl lcl. TcRnIf gbl lcl HscEnv
</span><a href="GHC.Tc.Utils.Monad.html#getTopEnv"><span class="hs-identifier hs-var">getTopEnv</span></a></span><span>
</span><span id="line-289"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084943"><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681084943"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO FindResult -&gt; IOEnv (Env TcGblEnv TcLclEnv) FindResult
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO FindResult -&gt; IOEnv (Env TcGblEnv TcLclEnv) FindResult)
-&gt; IO FindResult -&gt; IOEnv (Env TcGblEnv TcLclEnv) FindResult
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; ModuleName -&gt; Maybe FastString -&gt; IO FindResult
</span><a href="GHC.Driver.Finder.html#findImportedModule"><span class="hs-identifier hs-var">findImportedModule</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084944"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681084947"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FastString
</span><a href="#local-6989586621681084945"><span class="hs-identifier hs-var">maybe_pkg</span></a></span><span>
</span><span id="line-290"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681084943"><span class="hs-identifier hs-var">res</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-291"></span><span>           </span><span class="annot"><a href="GHC.Driver.Types.html#Found"><span class="hs-identifier hs-type">Found</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681084940"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084940"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IfG (MaybeErr MsgDoc ModIface) -&gt; RnM (MaybeErr MsgDoc ModIface)
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG (MaybeErr MsgDoc ModIface) -&gt; RnM (MaybeErr MsgDoc ModIface))
-&gt; IfG (MaybeErr MsgDoc ModIface) -&gt; RnM (MaybeErr MsgDoc ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfG (MaybeErr MsgDoc ModIface)
forall lcl.
MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084948"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084940"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsBootInterface -&gt; WhereFrom
</span><a href="GHC.Tc.Types.html#ImportByUser"><span class="hs-identifier hs-var">ImportByUser</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084946"><span class="hs-identifier hs-var">want_boot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>           </span><span class="hs-comment">-- TODO: Make sure this error message is good</span><span>
</span><span id="line-293"></span><span>           </span><span id="local-6989586621681084938"><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681084938"><span class="hs-identifier hs-var">err</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface -&gt; RnM (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc ModIface
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ModuleName -&gt; FindResult -&gt; MsgDoc
</span><a href="GHC.Driver.Finder.html#cannotFindModule"><span class="hs-identifier hs-var">cannotFindModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084944"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621681084947"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">FindResult
</span><a href="#local-6989586621681084938"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-comment">-- | Load interface directly for a fully qualified 'Module'.  (This is a fairly</span><span>
</span><span id="line-296"></span><span class="hs-comment">-- rare operation, but in particular it is used to load orphan modules</span><span>
</span><span id="line-297"></span><span class="hs-comment">-- in order to pull their instances into the global package table and to</span><span>
</span><span id="line-298"></span><span class="hs-comment">-- handle some operations in GHCi).</span><span>
</span><span id="line-299"></span><span class="annot"><a href="GHC.Iface.Load.html#loadModuleInterface"><span class="hs-identifier hs-type">loadModuleInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-300"></span><span id="loadModuleInterface"><span class="annot"><span class="annottext">loadModuleInterface :: MsgDoc -&gt; Module -&gt; RnM ModIface
</span><a href="GHC.Iface.Load.html#loadModuleInterface"><span class="hs-identifier hs-var hs-var">loadModuleInterface</span></a></span></span><span> </span><span id="local-6989586621681084935"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084935"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084934"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084934"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfG ModIface -&gt; RnM ModIface
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; IfG ModIface
forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var">loadSysInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084935"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084934"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">-- | Load interfaces for a collection of modules.</span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.Iface.Load.html#loadModuleInterfaces"><span class="hs-identifier hs-type">loadModuleInterfaces</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span id="loadModuleInterfaces"><span class="annot"><span class="annottext">loadModuleInterfaces :: MsgDoc -&gt; [Module] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Iface.Load.html#loadModuleInterfaces"><span class="hs-identifier hs-var hs-var">loadModuleInterfaces</span></a></span></span><span> </span><span id="local-6989586621681084933"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084933"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084932"><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084932"><span class="hs-identifier hs-var">mods</span></a></span></span><span>
</span><span id="line-305"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Module] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084932"><span class="hs-identifier hs-var">mods</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfG () -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Module -&gt; IfG ModIface) -&gt; [Module] -&gt; IfG ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; IfG ModIface
</span><a href="#local-6989586621681084929"><span class="hs-identifier hs-var">load</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084932"><span class="hs-identifier hs-var">mods</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-308"></span><span>    </span><span id="local-6989586621681084929"><span class="annot"><span class="annottext">load :: Module -&gt; IfG ModIface
</span><a href="#local-6989586621681084929"><span class="hs-identifier hs-var hs-var">load</span></a></span></span><span> </span><span id="local-6989586621681084928"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084928"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; IfG ModIface
forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var">loadSysInterface</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084933"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084928"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084928"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span class="hs-comment">-- | Loads the interface for a given Name.</span><span>
</span><span id="line-311"></span><span class="hs-comment">-- Should only be called for an imported name;</span><span>
</span><span id="line-312"></span><span class="hs-comment">-- otherwise loadSysInterface may not find the interface</span><span>
</span><span id="line-313"></span><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceForName"><span class="hs-identifier hs-type">loadInterfaceForName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRn"><span class="hs-identifier hs-type">TcRn</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-314"></span><span id="loadInterfaceForName"><span class="annot"><span class="annottext">loadInterfaceForName :: MsgDoc -&gt; Name -&gt; RnM ModIface
</span><a href="GHC.Iface.Load.html#loadInterfaceForName"><span class="hs-identifier hs-var hs-var">loadInterfaceForName</span></a></span></span><span> </span><span id="local-6989586621681084926"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084926"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084925"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084925"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-315"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Utils.Misc.html#debugIsOn"><span class="hs-identifier hs-var">debugIsOn</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) ()
 -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>  </span><span class="hs-comment">-- Check pre-condition</span><span>
</span><span id="line-316"></span><span>         </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084924"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084924"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) Module
forall (m :: * -&gt; *). HasModule m =&gt; m Module
</span><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier hs-var">getModule</span></a></span><span>
</span><span id="line-317"></span><span>            </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">MASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">nameIsLocalOrFrom</span><span> </span><span class="hs-identifier">this_mod</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">parens</span><span> </span><span class="hs-identifier">doc</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-318"></span><span>      </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">name</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>        </span><span class="annot"><span class="annottext">IfG ModIface -&gt; RnM ModIface
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG ModIface -&gt; RnM ModIface) -&gt; IfG ModIface -&gt; RnM ModIface
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; IfG ModIface
forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var">loadSysInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084926"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084925"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- | Only loads the interface for external non-local names.</span><span>
</span><span id="line-322"></span><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceForNameMaybe"><span class="hs-identifier hs-type">loadInterfaceForNameMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRn"><span class="hs-identifier hs-type">TcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span id="loadInterfaceForNameMaybe"><span class="annot"><span class="annottext">loadInterfaceForNameMaybe :: MsgDoc -&gt; Name -&gt; TcRn (Maybe ModIface)
</span><a href="GHC.Iface.Load.html#loadInterfaceForNameMaybe"><span class="hs-identifier hs-var hs-var">loadInterfaceForNameMaybe</span></a></span></span><span> </span><span id="local-6989586621681084922"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084922"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084921"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084921"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-324"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084920"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084920"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) Module
forall (m :: * -&gt; *). HasModule m =&gt; m Module
</span><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier hs-var">getModule</span></a></span><span>
</span><span id="line-325"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var">nameIsLocalOrFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084920"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084921"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var">isExternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084921"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe ModIface -&gt; TcRn (Maybe ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ModIface
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-327"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Maybe ModIface
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(ModIface -&gt; Maybe ModIface)
-&gt; RnM ModIface -&gt; TcRn (Maybe ModIface)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfG ModIface -&gt; RnM ModIface
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG ModIface -&gt; RnM ModIface) -&gt; IfG ModIface -&gt; RnM ModIface
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; IfG ModIface
forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var">loadSysInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084922"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084921"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-328"></span><span>       </span><span class="hs-special">}</span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="hs-comment">-- | Loads the interface for a given Module.</span><span>
</span><span id="line-331"></span><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceForModule"><span class="hs-identifier hs-type">loadInterfaceForModule</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRn"><span class="hs-identifier hs-type">TcRn</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-332"></span><span id="loadInterfaceForModule"><span class="annot"><span class="annottext">loadInterfaceForModule :: MsgDoc -&gt; Module -&gt; RnM ModIface
</span><a href="GHC.Iface.Load.html#loadInterfaceForModule"><span class="hs-identifier hs-var hs-var">loadInterfaceForModule</span></a></span></span><span> </span><span id="local-6989586621681084917"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084917"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084916"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084916"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-333"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-334"></span><span>    </span><span class="hs-comment">-- Should not be called with this module</span><span>
</span><span id="line-335"></span><span>    </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Utils.Misc.html#debugIsOn"><span class="hs-identifier hs-var">debugIsOn</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) ()
 -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-336"></span><span>      </span><span id="local-6989586621681084915"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084915"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) Module
forall (m :: * -&gt; *). HasModule m =&gt; m Module
</span><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier hs-var">getModule</span></a></span><span>
</span><span id="line-337"></span><span>      </span><span class="hs-identifier">MASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">this_mod</span><span> </span><span class="hs-operator">/=</span><span> </span><span class="hs-identifier">m</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">m</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">parens</span><span> </span><span class="hs-identifier">doc</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-338"></span><span>    </span><span class="annot"><span class="annottext">IfG ModIface -&gt; RnM ModIface
forall a. IfG a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceTcRn"><span class="hs-identifier hs-var">initIfaceTcRn</span></a></span><span> </span><span class="annot"><span class="annottext">(IfG ModIface -&gt; RnM ModIface) -&gt; IfG ModIface -&gt; RnM ModIface
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; IfG ModIface
forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var">loadSysInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084917"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084916"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="hs-comment">{-
*********************************************************
*                                                      *
                loadInterface

        The main function to load an interface
        for an imported module, and put it in
        the External Package State
*                                                      *
*********************************************************
-}</span><span>
</span><span id="line-351"></span><span>
</span><span id="line-352"></span><span class="hs-comment">-- | An 'IfM' function to load the home interface for a wired-in thing,</span><span>
</span><span id="line-353"></span><span class="hs-comment">-- so that we're sure that we see its instance declarations and rules</span><span>
</span><span id="line-354"></span><span class="hs-comment">-- See Note [Loading instances for wired-in things]</span><span>
</span><span id="line-355"></span><span id="local-6989586621681085558"><span class="annot"><a href="GHC.Iface.Load.html#loadWiredInHomeIface"><span class="hs-identifier hs-type">loadWiredInHomeIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085558"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-356"></span><span id="loadWiredInHomeIface"><span class="annot"><span class="annottext">loadWiredInHomeIface :: forall lcl. Name -&gt; IfM lcl ()
</span><a href="GHC.Iface.Load.html#loadWiredInHomeIface"><span class="hs-identifier hs-var hs-var">loadWiredInHomeIface</span></a></span></span><span> </span><span id="local-6989586621681084910"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084910"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-357"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isWiredInName</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">ModIface
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; IfM lcl ModIface
forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var">loadSysInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084909"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084910"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IfM lcl ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-360"></span><span>    </span><span id="local-6989586621681084909"><span class="annot"><span class="annottext">doc :: MsgDoc
</span><a href="#local-6989586621681084909"><span class="hs-identifier hs-var hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Need home interface for wired-in thing&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084910"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-363"></span><span class="hs-comment">-- | Loads a system interface and throws an exception if it fails</span><span>
</span><span id="line-364"></span><span id="local-6989586621681085522"><span class="annot"><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-type">loadSysInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085522"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span></span><span>
</span><span id="line-365"></span><span id="loadSysInterface"><span class="annot"><span class="annottext">loadSysInterface :: forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadSysInterface"><span class="hs-identifier hs-var hs-var">loadSysInterface</span></a></span></span><span> </span><span id="local-6989586621681084908"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084908"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084907"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084907"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
forall lcl. MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadInterfaceWithException"><span class="hs-identifier hs-var">loadInterfaceWithException</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084908"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084907"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportBySystem"><span class="hs-identifier hs-var">ImportBySystem</span></a></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-368"></span><span class="hs-comment">-- | Loads a user interface and throws an exception if it fails. The first parameter indicates</span><span>
</span><span id="line-369"></span><span class="hs-comment">-- whether we should import the boot variant of the module</span><span>
</span><span id="line-370"></span><span id="local-6989586621681085508"><span class="annot"><a href="GHC.Iface.Load.html#loadUserInterface"><span class="hs-identifier hs-type">loadUserInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#IsBootInterface"><span class="hs-identifier hs-type">IsBootInterface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085508"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span></span><span>
</span><span id="line-371"></span><span id="loadUserInterface"><span class="annot"><span class="annottext">loadUserInterface :: forall lcl. IsBootInterface -&gt; MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadUserInterface"><span class="hs-identifier hs-var hs-var">loadUserInterface</span></a></span></span><span> </span><span id="local-6989586621681084905"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084905"><span class="hs-identifier hs-var">is_boot</span></a></span></span><span> </span><span id="local-6989586621681084904"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084904"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084903"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084903"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span>
</span><span id="line-372"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
forall lcl. MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadInterfaceWithException"><span class="hs-identifier hs-var">loadInterfaceWithException</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084904"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084903"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsBootInterface -&gt; WhereFrom
</span><a href="GHC.Tc.Types.html#ImportByUser"><span class="hs-identifier hs-var">ImportByUser</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084905"><span class="hs-identifier hs-var">is_boot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-373"></span><span>
</span><span id="line-374"></span><span id="local-6989586621681084902"><span class="annot"><a href="GHC.Iface.Load.html#loadPluginInterface"><span class="hs-identifier hs-type">loadPluginInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681084902"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span></span><span>
</span><span id="line-375"></span><span id="loadPluginInterface"><span class="annot"><span class="annottext">loadPluginInterface :: forall lcl. MsgDoc -&gt; Module -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadPluginInterface"><span class="hs-identifier hs-var hs-var">loadPluginInterface</span></a></span></span><span> </span><span id="local-6989586621681084901"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084901"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084900"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084900"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span>
</span><span id="line-376"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
forall lcl. MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadInterfaceWithException"><span class="hs-identifier hs-var">loadInterfaceWithException</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084901"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084900"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportByPlugin"><span class="hs-identifier hs-var">ImportByPlugin</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-379"></span><span class="hs-comment">-- | A wrapper for 'loadInterface' that throws an exception if it fails</span><span>
</span><span id="line-380"></span><span id="local-6989586621681085509"><span class="annot"><a href="GHC.Iface.Load.html#loadInterfaceWithException"><span class="hs-identifier hs-type">loadInterfaceWithException</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#WhereFrom"><span class="hs-identifier hs-type">WhereFrom</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085509"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span></span><span>
</span><span id="line-381"></span><span id="loadInterfaceWithException"><span class="annot"><span class="annottext">loadInterfaceWithException :: forall lcl. MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl ModIface
</span><a href="GHC.Iface.Load.html#loadInterfaceWithException"><span class="hs-identifier hs-var hs-var">loadInterfaceWithException</span></a></span></span><span> </span><span id="local-6989586621681084898"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084898"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681084897"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084897"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span> </span><span id="local-6989586621681084896"><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084896"><span class="hs-identifier hs-var">where_from</span></a></span></span><span>
</span><span id="line-382"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TcRnIf IfGblEnv lcl (MaybeErr MsgDoc ModIface)
-&gt; TcRnIf IfGblEnv lcl ModIface
forall gbl lcl a.
TcRnIf gbl lcl (MaybeErr MsgDoc a) -&gt; TcRnIf gbl lcl a
</span><a href="GHC.Tc.Utils.Monad.html#withException"><span class="hs-identifier hs-var">withException</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc
-&gt; Module
-&gt; WhereFrom
-&gt; TcRnIf IfGblEnv lcl (MaybeErr MsgDoc ModIface)
forall lcl.
MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084898"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084897"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084896"><span class="hs-identifier hs-var">where_from</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-385"></span><span id="local-6989586621681085547"><span class="annot"><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-type">loadInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#WhereFrom"><span class="hs-identifier hs-type">WhereFrom</span></a></span><span>
</span><span id="line-386"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfM"><span class="hs-identifier hs-type">IfM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085547"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">-- loadInterface looks in both the HPT and PIT for the required interface</span><span>
</span><span id="line-389"></span><span class="hs-comment">-- If not found, it loads it, and puts it in the PIT (always).</span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="hs-comment">-- If it can't find a suitable interface file, we</span><span>
</span><span id="line-392"></span><span class="hs-comment">--      a) modify the PackageIfaceTable to have an empty entry</span><span>
</span><span id="line-393"></span><span class="hs-comment">--              (to avoid repeated complaints)</span><span>
</span><span id="line-394"></span><span class="hs-comment">--      b) return (Left message)</span><span>
</span><span id="line-395"></span><span class="hs-comment">--</span><span>
</span><span id="line-396"></span><span class="hs-comment">-- It's not necessarily an error for there not to be an interface</span><span>
</span><span id="line-397"></span><span class="hs-comment">-- file -- perhaps the module has changed, and that interface</span><span>
</span><span id="line-398"></span><span class="hs-comment">-- is no longer used</span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span id="loadInterface"><span class="annot"><span class="annottext">loadInterface :: forall lcl.
MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var hs-var">loadInterface</span></a></span></span><span> </span><span id="local-6989586621681084846"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084846"><span class="hs-identifier hs-var">doc_str</span></a></span></span><span> </span><span id="local-6989586621681084845"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681084844"><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084844"><span class="hs-identifier hs-var">from</span></a></span></span><span>
</span><span id="line-401"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
forall u. GenModule (GenUnit u) -&gt; Bool
</span><a href="GHC.Unit.Module.html#isHoleModule"><span class="hs-identifier hs-var">isHoleModule</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-402"></span><span>  </span><span class="hs-comment">-- Hole modules get special treatment</span><span>
</span><span id="line-403"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681084842"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084842"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-404"></span><span>       </span><span class="hs-comment">-- Redo search for our local hole module</span><span>
</span><span id="line-405"></span><span>       </span><span class="annot"><span class="annottext">MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall lcl.
MsgDoc -&gt; Module -&gt; WhereFrom -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#loadInterface"><span class="hs-identifier hs-var">loadInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084846"><span class="hs-identifier hs-var">doc_str</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ModuleName -&gt; Module
</span><a href="GHC.Driver.Session.html#mkHomeModule"><span class="hs-identifier hs-var">mkHomeModule</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084842"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084844"><span class="hs-identifier hs-var">from</span></a></span><span>
</span><span id="line-406"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-407"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
-&gt; (MaybeErr MsgDoc ModIface -&gt; ())
-&gt; IfM lcl (MaybeErr MsgDoc ModIface)
-&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a.
(MonadIO m, HasDynFlags m) =&gt;
MsgDoc -&gt; (a -&gt; ()) -&gt; m a -&gt; m a
</span><a href="GHC.Utils.Error.html#withTimingSilentD"><span class="hs-identifier hs-var">withTimingSilentD</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;loading interface&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; MaybeErr MsgDoc ModIface -&gt; ()
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IfM lcl (MaybeErr MsgDoc ModIface)
 -&gt; IfM lcl (MaybeErr MsgDoc ModIface))
-&gt; IfM lcl (MaybeErr MsgDoc ModIface)
-&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-408"></span><span>    </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span>       </span><span class="hs-comment">-- Read the state</span><span>
</span><span id="line-409"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621681084837"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084837"><span class="hs-identifier hs-var">eps</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681084836"><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084836"><span class="hs-identifier hs-var">hpt</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf IfGblEnv lcl (ExternalPackageState, HomePackageTable)
forall gbl lcl.
TcRnIf gbl lcl (ExternalPackageState, HomePackageTable)
</span><a href="GHC.Tc.Utils.Monad.html#getEpsAndHpt"><span class="hs-identifier hs-var">getEpsAndHpt</span></a></span><span>
</span><span id="line-410"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084834"><span class="annot"><span class="annottext">IfGblEnv
</span><a href="#local-6989586621681084834"><span class="hs-identifier hs-var">gbl_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf IfGblEnv lcl IfGblEnv
forall gbl lcl. TcRnIf gbl lcl gbl
</span><a href="GHC.Tc.Utils.Monad.html#getGblEnv"><span class="hs-identifier hs-var">getGblEnv</span></a></span><span>
</span><span id="line-411"></span><span>
</span><span id="line-412"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf IfGblEnv lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Considering whether to load&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084844"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span>                </span><span class="hs-comment">-- Check whether we have the interface already</span><span>
</span><span id="line-415"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084832"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084832"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env IfGblEnv lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-416"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HomePackageTable -&gt; PackageIfaceTable -&gt; Module -&gt; Maybe ModIface
</span><a href="GHC.Driver.Types.html#lookupIfaceByModule"><span class="hs-identifier hs-var">lookupIfaceByModule</span></a></span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084836"><span class="hs-identifier hs-var">hpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084837"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-417"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084829"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084829"><span class="hs-identifier hs-var">iface</span></a></span></span><span>
</span><span id="line-418"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; MaybeErr MsgDoc ModIface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084829"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">;</span><span>   </span><span class="hs-comment">-- Already loaded</span><span>
</span><span id="line-419"></span><span>                        </span><span class="hs-comment">-- The (src_imp == mi_boot iface) test checks that the already-loaded</span><span>
</span><span id="line-420"></span><span>                        </span><span class="hs-comment">-- interface isn't a boot iface.  This can conceivably happen,</span><span>
</span><span id="line-421"></span><span>                        </span><span class="hs-comment">-- if an earlier import had a before we got to real imports.   I think.</span><span>
</span><span id="line-422"></span><span>            </span><span class="annot"><span class="annottext">Maybe ModIface
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-423"></span><span>
</span><span id="line-424"></span><span>        </span><span class="hs-comment">-- READ THE MODULE IN</span><span>
</span><span id="line-425"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084828"><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084828"><span class="hs-identifier hs-var">read_result</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags
-&gt; ExternalPackageState
-&gt; Module
-&gt; WhereFrom
-&gt; MaybeErr MsgDoc IsBootInterface
</span><a href="GHC.Iface.Load.html#wantHiBootFile"><span class="hs-identifier hs-var">wantHiBootFile</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084832"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084837"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084844"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-426"></span><span>                           </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084826"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084826"><span class="hs-identifier hs-var">err</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; IOEnv (Env IfGblEnv lcl) (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084826"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>                           </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span id="local-6989586621681084825"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084825"><span class="hs-identifier hs-var">hi_boot_file</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc
-&gt; IsBootInterface
-&gt; Module
-&gt; IOEnv (Env IfGblEnv lcl) (MaybeErr MsgDoc (ModIface, String))
forall gbl lcl.
MsgDoc
-&gt; IsBootInterface
-&gt; Module
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="GHC.Iface.Load.html#computeInterface"><span class="hs-identifier hs-var">computeInterface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084846"><span class="hs-identifier hs-var">doc_str</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084825"><span class="hs-identifier hs-var">hi_boot_file</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-428"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084828"><span class="hs-identifier hs-var">read_result</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-429"></span><span>            </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084823"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084823"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-430"></span><span>                </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084822"><span class="annot"><span class="annottext">fake_iface :: ModIface
</span><a href="#local-6989586621681084822"><span class="hs-identifier hs-var hs-var">fake_iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; ModIface
</span><a href="GHC.Driver.Types.html#emptyFullModIface"><span class="hs-identifier hs-var">emptyFullModIface</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span>                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(ExternalPackageState -&gt; ExternalPackageState)
-&gt; TcRnIf IfGblEnv lcl ()
forall gbl lcl.
(ExternalPackageState -&gt; ExternalPackageState) -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#updateEps_"><span class="hs-identifier hs-var">updateEps_</span></a></span><span> </span><span class="annot"><span class="annottext">((ExternalPackageState -&gt; ExternalPackageState)
 -&gt; TcRnIf IfGblEnv lcl ())
-&gt; (ExternalPackageState -&gt; ExternalPackageState)
-&gt; TcRnIf IfGblEnv lcl ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681084819"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084819"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-433"></span><span>                        </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084819"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">eps_PIT :: PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var">eps_PIT</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIfaceTable -&gt; Module -&gt; ModIface -&gt; PackageIfaceTable
forall a. ModuleEnv a -&gt; Module -&gt; a -&gt; ModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#extendModuleEnv"><span class="hs-identifier hs-var">extendModuleEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084819"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084822"><span class="hs-identifier hs-var">fake_iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084822"><span class="hs-identifier hs-var">fake_iface</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-434"></span><span>                        </span><span class="hs-comment">-- Not found, so add an empty iface to</span><span>
</span><span id="line-435"></span><span>                        </span><span class="hs-comment">-- the EPS map so that we don't look again</span><span>
</span><span id="line-436"></span><span>
</span><span id="line-437"></span><span>                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface -&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc ModIface
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084823"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">;</span><span>
</span><span id="line-438"></span><span>
</span><span id="line-439"></span><span>        </span><span class="hs-comment">-- Found and parsed!</span><span>
</span><span id="line-440"></span><span>        </span><span class="hs-comment">-- We used to have a sanity check here that looked for:</span><span>
</span><span id="line-441"></span><span>        </span><span class="hs-comment">--  * System importing ..</span><span>
</span><span id="line-442"></span><span>        </span><span class="hs-comment">--  * a home package module ..</span><span>
</span><span id="line-443"></span><span>        </span><span class="hs-comment">--  * that we know nothing about (mb_dep == Nothing)!</span><span>
</span><span id="line-444"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-445"></span><span>        </span><span class="hs-comment">-- But this is no longer valid because thNameToGhcName allows users to</span><span>
</span><span id="line-446"></span><span>        </span><span class="hs-comment">-- cause the system to load arbitrary interfaces (by supplying an appropriate</span><span>
</span><span id="line-447"></span><span>        </span><span class="hs-comment">-- Template Haskell original-name).</span><span>
</span><span id="line-448"></span><span>            </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084816"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681084815"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084815"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-449"></span><span>        </span><span class="hs-keyword">let</span><span>
</span><span id="line-450"></span><span>            </span><span id="local-6989586621681084814"><span class="annot"><span class="annottext">loc_doc :: MsgDoc
</span><a href="#local-6989586621681084814"><span class="hs-identifier hs-var hs-var">loc_doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084815"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-451"></span><span>        </span><span class="hs-keyword">in</span><span>
</span><span id="line-452"></span><span>        </span><span class="annot"><span class="annottext">Module
-&gt; MsgDoc
-&gt; IsBootInterface
-&gt; IfL (MaybeErr MsgDoc ModIface)
-&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall a lcl.
Module -&gt; MsgDoc -&gt; IsBootInterface -&gt; IfL a -&gt; IfM lcl a
</span><a href="GHC.Tc.Utils.Monad.html#initIfaceLcl"><span class="hs-identifier hs-var">initIfaceLcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_semantic_module"><span class="hs-identifier hs-var">mi_semantic_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084814"><span class="hs-identifier hs-var">loc_doc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IsBootInterface
</span><a href="GHC.Driver.Types.html#mi_boot"><span class="hs-identifier hs-var">mi_boot</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IfL (MaybeErr MsgDoc ModIface)
 -&gt; IfM lcl (MaybeErr MsgDoc ModIface))
-&gt; IfL (MaybeErr MsgDoc ModIface)
-&gt; IfM lcl (MaybeErr MsgDoc ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span>        </span><span class="annot"><span class="annottext">IfL (MaybeErr MsgDoc ModIface) -&gt; IfL (MaybeErr MsgDoc ModIface)
forall a. IfL a -&gt; IfL a
</span><a href="GHC.Iface.Load.html#dontLeakTheHPT"><span class="hs-identifier hs-var">dontLeakTheHPT</span></a></span><span> </span><span class="annot"><span class="annottext">(IfL (MaybeErr MsgDoc ModIface) -&gt; IfL (MaybeErr MsgDoc ModIface))
-&gt; IfL (MaybeErr MsgDoc ModIface) -&gt; IfL (MaybeErr MsgDoc ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-455"></span><span>
</span><span id="line-456"></span><span>        </span><span class="hs-comment">--      Load the new ModIface into the External Package State</span><span>
</span><span id="line-457"></span><span>        </span><span class="hs-comment">-- Even home-package interfaces loaded by loadInterface</span><span>
</span><span id="line-458"></span><span>        </span><span class="hs-comment">--      (which only happens in OneShot mode; in Batch/Interactive</span><span>
</span><span id="line-459"></span><span>        </span><span class="hs-comment">--      mode, home-package modules are loaded one by one into the HPT)</span><span>
</span><span id="line-460"></span><span>        </span><span class="hs-comment">-- are put in the EPS.</span><span>
</span><span id="line-461"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-462"></span><span>        </span><span class="hs-comment">-- The main thing is to add the ModIface to the PIT, but</span><span>
</span><span id="line-463"></span><span>        </span><span class="hs-comment">-- we also take the</span><span>
</span><span id="line-464"></span><span>        </span><span class="hs-comment">--      IfaceDecls, IfaceClsInst, IfaceFamInst, IfaceRules,</span><span>
</span><span id="line-465"></span><span>        </span><span class="hs-comment">-- out of the ModIface and put them into the big EPS pools</span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span>        </span><span class="hs-comment">-- NB: *first* we do loadDecl, so that the provenance of all the locally-defined</span><span>
</span><span id="line-468"></span><span>        </span><span class="hs-comment">---    names is done correctly (notably, whether this is an .hi file or .hi-boot file).</span><span>
</span><span id="line-469"></span><span>        </span><span class="hs-comment">--     If we do loadExport first the wrong info gets into the cache (unless we</span><span>
</span><span id="line-470"></span><span>        </span><span class="hs-comment">--      explicitly tag each export which seems a bit of a bore)</span><span>
</span><span id="line-471"></span><span>
</span><span id="line-472"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084809"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084809"><span class="hs-identifier hs-var">ignore_prags</span></a></span></span><span>      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; TcRnIf IfGblEnv IfLclEnv Bool
forall gbl lcl. GeneralFlag -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#goptM"><span class="hs-identifier hs-var">goptM</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_IgnoreInterfacePragmas"><span class="hs-identifier hs-var">Opt_IgnoreInterfacePragmas</span></a></span><span>
</span><span id="line-473"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084806"><span class="annot"><span class="annottext">[(Name, TyThing)]
</span><a href="#local-6989586621681084806"><span class="hs-identifier hs-var">new_eps_decls</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; [(Fingerprint, IfaceDecl)] -&gt; IfL [(Name, TyThing)]
</span><a href="GHC.Iface.Load.html#loadDecls"><span class="hs-identifier hs-var">loadDecls</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084809"><span class="hs-identifier hs-var">ignore_prags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceDeclExts 'ModIfaceFinal]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceDeclExts phase]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var hs-var">mi_decls</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-474"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084804"><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621681084804"><span class="hs-identifier hs-var">new_eps_insts</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; IOEnv (Env IfGblEnv IfLclEnv) ClsInst)
-&gt; [IfaceClsInst] -&gt; IOEnv (Env IfGblEnv IfLclEnv) [ClsInst]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; IOEnv (Env IfGblEnv IfLclEnv) ClsInst
</span><a href="GHC.IfaceToCore.html#tcIfaceInst"><span class="hs-identifier hs-var">tcIfaceInst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceClsInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceClsInst]
</span><a href="GHC.Driver.Types.html#mi_insts"><span class="hs-identifier hs-var hs-var">mi_insts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-475"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084801"><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621681084801"><span class="hs-identifier hs-var">new_eps_fam_insts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; IOEnv (Env IfGblEnv IfLclEnv) FamInst)
-&gt; [IfaceFamInst] -&gt; IOEnv (Env IfGblEnv IfLclEnv) [FamInst]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; IOEnv (Env IfGblEnv IfLclEnv) FamInst
</span><a href="GHC.IfaceToCore.html#tcIfaceFamInst"><span class="hs-identifier hs-var">tcIfaceFamInst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceFamInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceFamInst]
</span><a href="GHC.Driver.Types.html#mi_fam_insts"><span class="hs-identifier hs-var hs-var">mi_fam_insts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084799"><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681084799"><span class="hs-identifier hs-var">new_eps_rules</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; [IfaceRule] -&gt; IfL [CoreRule]
</span><a href="GHC.IfaceToCore.html#tcIfaceRules"><span class="hs-identifier hs-var">tcIfaceRules</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084809"><span class="hs-identifier hs-var">ignore_prags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceRule]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceRule]
</span><a href="GHC.Driver.Types.html#mi_rules"><span class="hs-identifier hs-var hs-var">mi_rules</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-477"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084797"><span class="annot"><span class="annottext">[Annotation]
</span><a href="#local-6989586621681084797"><span class="hs-identifier hs-var">new_eps_anns</span></a></span></span><span>      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfaceAnnotation] -&gt; IfL [Annotation]
</span><a href="GHC.IfaceToCore.html#tcIfaceAnnotations"><span class="hs-identifier hs-var">tcIfaceAnnotations</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceAnnotation]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceAnnotation]
</span><a href="GHC.Driver.Types.html#mi_anns"><span class="hs-identifier hs-var hs-var">mi_anns</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-478"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084795"><span class="annot"><span class="annottext">[CompleteMatch]
</span><a href="#local-6989586621681084795"><span class="hs-identifier hs-var">new_eps_complete_sigs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[IfaceCompleteMatch] -&gt; IfL [CompleteMatch]
</span><a href="GHC.IfaceToCore.html#tcIfaceCompleteSigs"><span class="hs-identifier hs-var">tcIfaceCompleteSigs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceCompleteMatch]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceCompleteMatch]
</span><a href="GHC.Driver.Types.html#mi_complete_sigs"><span class="hs-identifier hs-var hs-var">mi_complete_sigs</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084793"><span class="annot"><span class="annottext">final_iface :: ModIface
</span><a href="#local-6989586621681084793"><span class="hs-identifier hs-var hs-var">final_iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-481"></span><span>                                </span><span class="annot"><span class="annottext">mi_decls :: [IfaceDeclExts 'ModIfaceFinal]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var">mi_decls</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [(Fingerprint, IfaceDecl)]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No mi_decls in PIT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-482"></span><span>                                </span><span class="annot"><span class="annottext">mi_insts :: [IfaceClsInst]
</span><a href="GHC.Driver.Types.html#mi_insts"><span class="hs-identifier hs-var">mi_insts</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [IfaceClsInst]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No mi_insts in PIT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-483"></span><span>                                </span><span class="annot"><span class="annottext">mi_fam_insts :: [IfaceFamInst]
</span><a href="GHC.Driver.Types.html#mi_fam_insts"><span class="hs-identifier hs-var">mi_fam_insts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [IfaceFamInst]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No mi_fam_insts in PIT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-484"></span><span>                                </span><span class="annot"><span class="annottext">mi_rules :: [IfaceRule]
</span><a href="GHC.Driver.Types.html#mi_rules"><span class="hs-identifier hs-var">mi_rules</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [IfaceRule]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No mi_rules in PIT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-485"></span><span>                                </span><span class="annot"><span class="annottext">mi_anns :: [IfaceAnnotation]
</span><a href="GHC.Driver.Types.html#mi_anns"><span class="hs-identifier hs-var">mi_anns</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [IfaceAnnotation]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No mi_anns in PIT&quot;</span></span><span>
</span><span id="line-486"></span><span>                              </span><span class="hs-special">}</span><span>
</span><span id="line-487"></span><span>               </span><span class="hs-special">}</span><span>
</span><span id="line-488"></span><span>
</span><span id="line-489"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084791"><span class="annot"><span class="annottext">bad_boot :: Bool
</span><a href="#local-6989586621681084791"><span class="hs-identifier hs-var hs-var">bad_boot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; IsBootInterface
</span><a href="GHC.Driver.Types.html#mi_boot"><span class="hs-identifier hs-var">mi_boot</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; IsBootInterface -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#IsBoot"><span class="hs-identifier hs-var">IsBoot</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">((Module, IfG TypeEnv) -&gt; Module)
-&gt; Maybe (Module, IfG TypeEnv) -&gt; Maybe Module
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">(Module, IfG TypeEnv) -&gt; Module
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfGblEnv -&gt; Maybe (Module, IfG TypeEnv)
</span><a href="GHC.Tc.Types.html#if_rec_types"><span class="hs-identifier hs-var hs-var">if_rec_types</span></a></span><span> </span><span class="annot"><span class="annottext">IfGblEnv
</span><a href="#local-6989586621681084834"><span class="hs-identifier hs-var">gbl_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Module -&gt; Maybe Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Maybe Module
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-490"></span><span>                            </span><span class="hs-comment">-- Warn against an EPS-updating import</span><span>
</span><span id="line-491"></span><span>                            </span><span class="hs-comment">-- of one's own boot file! (one-shot only)</span><span>
</span><span id="line-492"></span><span>                            </span><span class="hs-comment">-- See Note [Loading your own hi-boot file]</span><span>
</span><span id="line-493"></span><span>
</span><span id="line-494"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">WARN</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">bad_boot</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">mod</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-495"></span><span>          </span><span class="annot"><span class="annottext">(ExternalPackageState -&gt; ExternalPackageState) -&gt; IfL ()
forall gbl lcl.
(ExternalPackageState -&gt; ExternalPackageState) -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#updateEps_"><span class="hs-identifier hs-var">updateEps_</span></a></span><span>  </span><span class="annot"><span class="annottext">((ExternalPackageState -&gt; ExternalPackageState) -&gt; IfL ())
-&gt; (ExternalPackageState -&gt; ExternalPackageState) -&gt; IfL ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681084787"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-496"></span><span>           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module -&gt; PackageIfaceTable -&gt; Bool
forall a. Module -&gt; ModuleEnv a -&gt; Bool
</span><a href="GHC.Unit.Module.Env.html#elemModuleEnv"><span class="hs-identifier hs-var">elemModuleEnv</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ModIface -&gt; Bool
</span><a href="GHC.Iface.Load.html#is_external_sig"><span class="hs-identifier hs-var">is_external_sig</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084832"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-497"></span><span>                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-498"></span><span>           </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084791"><span class="hs-identifier hs-var">bad_boot</span></a></span><span>
</span><span id="line-499"></span><span>                </span><span class="hs-comment">-- See Note [Loading your own hi-boot file]</span><span>
</span><span id="line-500"></span><span>                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">eps_PTE :: TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var">eps_PTE</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeEnv -&gt; [(Name, TyThing)] -&gt; TypeEnv
</span><a href="GHC.Iface.Load.html#addDeclsToPTE"><span class="hs-identifier hs-var">addDeclsToPTE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var hs-var">eps_PTE</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Name, TyThing)]
</span><a href="#local-6989586621681084806"><span class="hs-identifier hs-var">new_eps_decls</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-501"></span><span>           </span><span class="hs-keyword">else</span><span>
</span><span id="line-502"></span><span>                </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-503"></span><span>                  </span><span class="annot"><span class="annottext">eps_PIT :: PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var">eps_PIT</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIfaceTable -&gt; Module -&gt; ModIface -&gt; PackageIfaceTable
forall a. ModuleEnv a -&gt; Module -&gt; a -&gt; ModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#extendModuleEnv"><span class="hs-identifier hs-var">extendModuleEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084793"><span class="hs-identifier hs-var">final_iface</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-504"></span><span>                  </span><span class="annot"><span class="annottext">eps_PTE :: TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var">eps_PTE</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeEnv -&gt; [(Name, TyThing)] -&gt; TypeEnv
</span><a href="GHC.Iface.Load.html#addDeclsToPTE"><span class="hs-identifier hs-var">addDeclsToPTE</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var hs-var">eps_PTE</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Name, TyThing)]
</span><a href="#local-6989586621681084806"><span class="hs-identifier hs-var">new_eps_decls</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-505"></span><span>                  </span><span class="annot"><span class="annottext">eps_rule_base :: PackageRuleBase
</span><a href="GHC.Driver.Types.html#eps_rule_base"><span class="hs-identifier hs-var">eps_rule_base</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageRuleBase -&gt; [CoreRule] -&gt; PackageRuleBase
</span><a href="GHC.Core.Rules.html#extendRuleBaseList"><span class="hs-identifier hs-var">extendRuleBaseList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageRuleBase
</span><a href="GHC.Driver.Types.html#eps_rule_base"><span class="hs-identifier hs-var hs-var">eps_rule_base</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-506"></span><span>                                                        </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681084799"><span class="hs-identifier hs-var">new_eps_rules</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-507"></span><span>                  </span><span class="annot"><span class="annottext">eps_complete_matches :: PackageCompleteMatchMap
</span><a href="GHC.Driver.Types.html#eps_complete_matches"><span class="hs-identifier hs-var">eps_complete_matches</span></a></span><span>
</span><span id="line-508"></span><span>                                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageCompleteMatchMap
-&gt; [CompleteMatch] -&gt; PackageCompleteMatchMap
</span><a href="GHC.Driver.Types.html#extendCompleteMatchMap"><span class="hs-identifier hs-var">extendCompleteMatchMap</span></a></span><span>
</span><span id="line-509"></span><span>                                         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageCompleteMatchMap
</span><a href="GHC.Driver.Types.html#eps_complete_matches"><span class="hs-identifier hs-var hs-var">eps_complete_matches</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-510"></span><span>                                         </span><span class="annot"><span class="annottext">[CompleteMatch]
</span><a href="#local-6989586621681084795"><span class="hs-identifier hs-var">new_eps_complete_sigs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-511"></span><span>                  </span><span class="annot"><span class="annottext">eps_inst_env :: PackageInstEnv
</span><a href="GHC.Driver.Types.html#eps_inst_env"><span class="hs-identifier hs-var">eps_inst_env</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageInstEnv -&gt; [ClsInst] -&gt; PackageInstEnv
</span><a href="GHC.Core.InstEnv.html#extendInstEnvList"><span class="hs-identifier hs-var">extendInstEnvList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageInstEnv
</span><a href="GHC.Driver.Types.html#eps_inst_env"><span class="hs-identifier hs-var hs-var">eps_inst_env</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-512"></span><span>                                                       </span><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621681084804"><span class="hs-identifier hs-var">new_eps_insts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-513"></span><span>                  </span><span class="annot"><span class="annottext">eps_fam_inst_env :: PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_fam_inst_env"><span class="hs-identifier hs-var">eps_fam_inst_env</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageFamInstEnv -&gt; [FamInst] -&gt; PackageFamInstEnv
</span><a href="GHC.Core.FamInstEnv.html#extendFamInstEnvList"><span class="hs-identifier hs-var">extendFamInstEnvList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_fam_inst_env"><span class="hs-identifier hs-var hs-var">eps_fam_inst_env</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>                                                          </span><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621681084801"><span class="hs-identifier hs-var">new_eps_fam_insts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-515"></span><span>                  </span><span class="annot"><span class="annottext">eps_ann_env :: PackageAnnEnv
</span><a href="GHC.Driver.Types.html#eps_ann_env"><span class="hs-identifier hs-var">eps_ann_env</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageAnnEnv -&gt; [Annotation] -&gt; PackageAnnEnv
</span><a href="GHC.Types.Annotations.html#extendAnnEnvList"><span class="hs-identifier hs-var">extendAnnEnvList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageAnnEnv
</span><a href="GHC.Driver.Types.html#eps_ann_env"><span class="hs-identifier hs-var hs-var">eps_ann_env</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-516"></span><span>                                                      </span><span class="annot"><span class="annottext">[Annotation]
</span><a href="#local-6989586621681084797"><span class="hs-identifier hs-var">new_eps_anns</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-517"></span><span>                  </span><span class="annot"><span class="annottext">eps_mod_fam_inst_env :: ModuleEnv PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_mod_fam_inst_env"><span class="hs-identifier hs-var">eps_mod_fam_inst_env</span></a></span><span>
</span><span id="line-518"></span><span>                                   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-519"></span><span>                                       </span><span id="local-6989586621681084772"><span class="annot"><span class="annottext">fam_inst_env :: PackageFamInstEnv
</span><a href="#local-6989586621681084772"><span class="hs-identifier hs-var hs-var">fam_inst_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-520"></span><span>                                         </span><span class="annot"><span class="annottext">PackageFamInstEnv -&gt; [FamInst] -&gt; PackageFamInstEnv
</span><a href="GHC.Core.FamInstEnv.html#extendFamInstEnvList"><span class="hs-identifier hs-var">extendFamInstEnvList</span></a></span><span> </span><span class="annot"><span class="annottext">PackageFamInstEnv
</span><a href="GHC.Core.FamInstEnv.html#emptyFamInstEnv"><span class="hs-identifier hs-var">emptyFamInstEnv</span></a></span><span>
</span><span id="line-521"></span><span>                                                              </span><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621681084801"><span class="hs-identifier hs-var">new_eps_fam_insts</span></a></span><span>
</span><span id="line-522"></span><span>                                     </span><span class="hs-keyword">in</span><span>
</span><span id="line-523"></span><span>                                     </span><span class="annot"><span class="annottext">ModuleEnv PackageFamInstEnv
-&gt; Module -&gt; PackageFamInstEnv -&gt; ModuleEnv PackageFamInstEnv
forall a. ModuleEnv a -&gt; Module -&gt; a -&gt; ModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#extendModuleEnv"><span class="hs-identifier hs-var">extendModuleEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; ModuleEnv PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_mod_fam_inst_env"><span class="hs-identifier hs-var hs-var">eps_mod_fam_inst_env</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-524"></span><span>                                                     </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084845"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-525"></span><span>                                                     </span><span class="annot"><span class="annottext">PackageFamInstEnv
</span><a href="#local-6989586621681084772"><span class="hs-identifier hs-var">fam_inst_env</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-526"></span><span>                  </span><span class="annot"><span class="annottext">eps_stats :: EpsStats
</span><a href="GHC.Driver.Types.html#eps_stats"><span class="hs-identifier hs-var">eps_stats</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EpsStats -&gt; Int -&gt; Int -&gt; Int -&gt; EpsStats
</span><a href="GHC.Driver.Types.html#addEpsInStats"><span class="hs-identifier hs-var">addEpsInStats</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; EpsStats
</span><a href="GHC.Driver.Types.html#eps_stats"><span class="hs-identifier hs-var hs-var">eps_stats</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084787"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-527"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Name, TyThing)] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, TyThing)]
</span><a href="#local-6989586621681084806"><span class="hs-identifier hs-var">new_eps_decls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-528"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ClsInst] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621681084804"><span class="hs-identifier hs-var">new_eps_insts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-529"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreRule] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681084799"><span class="hs-identifier hs-var">new_eps_rules</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-comment">-- invoke plugins with *full* interface, not final_iface, to ensure</span><span>
</span><span id="line-532"></span><span>          </span><span class="hs-comment">-- that plugins have access to declarations, etc.</span><span>
</span><span id="line-533"></span><span>          </span><span id="local-6989586621681084767"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084767"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; PluginOperation (IOEnv (Env IfGblEnv IfLclEnv)) ModIface
-&gt; ModIface
-&gt; IOEnv (Env IfGblEnv IfLclEnv) ModIface
forall (m :: * -&gt; *) a.
Monad m =&gt;
DynFlags -&gt; PluginOperation m a -&gt; a -&gt; m a
</span><a href="GHC.Driver.Plugins.html#withPlugins"><span class="hs-identifier hs-var">withPlugins</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084832"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681084765"><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621681084765"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Plugin -&gt; forall lcl. [String] -&gt; ModIface -&gt; IfM lcl ModIface
</span><a href="GHC.Driver.Plugins.html#interfaceLoadAction"><span class="hs-identifier hs-var hs-var">interfaceLoadAction</span></a></span><span> </span><span class="annot"><span class="annottext">Plugin
</span><a href="#local-6989586621681084765"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084816"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-534"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface -&gt; IfL (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; MaybeErr MsgDoc ModIface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084767"><span class="hs-identifier hs-var">res</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-535"></span><span>    </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="hs-comment">{- Note [Loading your own hi-boot file]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Generally speaking, when compiling module M, we should not
load M.hi boot into the EPS.  After all, we are very shortly
going to have full information about M.  Moreover, see
Note [Do not update EPS with your own hi-boot] in GHC.Iface.Recomp.

But there is a HORRIBLE HACK here.

* At the end of tcRnImports, we call checkFamInstConsistency to
  check consistency of imported type-family instances
  See Note [The type family instance consistency story] in GHC.Tc.Instance.Family

* Alas, those instances may refer to data types defined in M,
  if there is a M.hs-boot.

* And that means we end up loading M.hi-boot, because those
  data types are not yet in the type environment.

But in this weird case, /all/ we need is the types. We don't need
instances, rules etc.  And if we put the instances in the EPS
we get &quot;duplicate instance&quot; warnings when we compile the &quot;real&quot;
instance in M itself.  Hence the strange business of just updateing
the eps_PTE.

This really happens in practice.  The module &quot;GHC.Hs.Expr&quot; gets
&quot;duplicate instance&quot; errors if this hack is not present.

This is a mess.


Note [HPT space leak] (#15111)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In IfL, we defer some work until it is demanded using forkM, such
as building TyThings from IfaceDecls. These thunks are stored in
the ExternalPackageState, and they might never be poked.  If we're
not careful, these thunks will capture the state of the loaded
program when we read an interface file, and retain all that data
for ever.

Therefore, when loading a package interface file , we use a &quot;clean&quot;
version of the HscEnv with all the data about the currently loaded
program stripped out. Most of the fields can be panics because
we'll never read them, but hsc_HPT needs to be empty because this
interface will cause other interfaces to be loaded recursively, and
when looking up those interfaces we use the HPT in loadInterface.
We know that none of the interfaces below here can refer to
home-package modules however, so it's safe for the HPT to be empty.
-}</span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span id="local-6989586621681085468"><span class="annot"><a href="GHC.Iface.Load.html#dontLeakTheHPT"><span class="hs-identifier hs-type">dontLeakTheHPT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfL"><span class="hs-identifier hs-type">IfL</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085468"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfL"><span class="hs-identifier hs-type">IfL</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085468"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-588"></span><span id="dontLeakTheHPT"><span class="annot"><span class="annottext">dontLeakTheHPT :: forall a. IfL a -&gt; IfL a
</span><a href="GHC.Iface.Load.html#dontLeakTheHPT"><span class="hs-identifier hs-var hs-var">dontLeakTheHPT</span></a></span></span><span> </span><span id="local-6989586621681084762"><span class="annot"><span class="annottext">IfL a
</span><a href="#local-6989586621681084762"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-589"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-590"></span><span>    </span><span id="local-6989586621681084761"><span class="annot"><span class="annottext">cleanTopEnv :: HscEnv -&gt; HscEnv
</span><a href="#local-6989586621681084761"><span class="hs-identifier hs-var hs-var">cleanTopEnv</span></a></span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span class="hs-special">{</span><span id="local-6989586621681084749"><span id="local-6989586621681084750"><span id="local-6989586621681084751"><span id="local-6989586621681084752"><span id="local-6989586621681084753"><span id="local-6989586621681084754"><span id="local-6989586621681084755"><span id="local-6989586621681084756"><span id="local-6989586621681084757"><span id="local-6989586621681084758"><span id="local-6989586621681084759"><span class="annot"><span class="annottext">[Target]
Maybe (Module, IORef TypeEnv)
Maybe Interp
IORef FinderCache
IORef NameCache
IORef ExternalPackageState
DynFlags
HomePackageTable
DynLinker
InteractiveContext
ModuleGraph
hsc_type_env_var :: HscEnv -&gt; Maybe (Module, IORef TypeEnv)
hsc_targets :: HscEnv -&gt; [Target]
hsc_mod_graph :: HscEnv -&gt; ModuleGraph
hsc_interp :: HscEnv -&gt; Maybe Interp
hsc_dynLinker :: HscEnv -&gt; DynLinker
hsc_NC :: HscEnv -&gt; IORef NameCache
hsc_IC :: HscEnv -&gt; InteractiveContext
hsc_HPT :: HscEnv -&gt; HomePackageTable
hsc_FC :: HscEnv -&gt; IORef FinderCache
hsc_EPS :: HscEnv -&gt; IORef ExternalPackageState
hsc_dynLinker :: DynLinker
hsc_interp :: Maybe Interp
hsc_type_env_var :: Maybe (Module, IORef TypeEnv)
hsc_FC :: IORef FinderCache
hsc_NC :: IORef NameCache
hsc_EPS :: IORef ExternalPackageState
hsc_HPT :: HomePackageTable
hsc_IC :: InteractiveContext
hsc_mod_graph :: ModuleGraph
hsc_targets :: [Target]
hsc_dflags :: DynFlags
hsc_dflags :: HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_type_env_var"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-591"></span><span>       </span><span class="hs-keyword">let</span><span>
</span><span id="line-592"></span><span>         </span><span class="hs-comment">-- wrinkle: when we're typechecking in --backpack mode, the</span><span>
</span><span id="line-593"></span><span>         </span><span class="hs-comment">-- instantiation of a signature might reside in the HPT, so</span><span>
</span><span id="line-594"></span><span>         </span><span class="hs-comment">-- this case breaks the assumption that EPS interfaces only</span><span>
</span><span id="line-595"></span><span>         </span><span class="hs-comment">-- refer to other EPS interfaces.</span><span>
</span><span id="line-596"></span><span>         </span><span class="hs-comment">-- As a temporary (MP Oct 2021 #20509) we only keep the HPT if it</span><span>
</span><span id="line-597"></span><span>         </span><span class="hs-comment">-- contains any hole modules.</span><span>
</span><span id="line-598"></span><span>         </span><span class="hs-comment">-- Quite a few tests in testsuite/tests/backpack break without this</span><span>
</span><span id="line-599"></span><span>         </span><span class="hs-comment">-- tweak.</span><span>
</span><span id="line-600"></span><span>         </span><span id="local-6989586621681084738"><span class="annot"><span class="annottext">keepFor20509 :: HomeModInfo -&gt; Bool
</span><a href="#local-6989586621681084738"><span class="hs-identifier hs-var hs-var">keepFor20509</span></a></span></span><span> </span><span id="local-6989586621681084737"><span class="annot"><span class="annottext">HomeModInfo
</span><a href="#local-6989586621681084737"><span class="hs-identifier hs-var">hmi</span></a></span></span><span>
</span><span id="line-601"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
forall u. GenModule (GenUnit u) -&gt; Bool
</span><a href="GHC.Unit.Module.html#isHoleModule"><span class="hs-identifier hs-var">isHoleModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_semantic_module"><span class="hs-identifier hs-var">mi_semantic_module</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HomeModInfo -&gt; ModIface
</span><a href="GHC.Driver.Types.html#hm_iface"><span class="hs-identifier hs-var hs-var">hm_iface</span></a></span><span> </span><span class="annot"><span class="annottext">HomeModInfo
</span><a href="#local-6989586621681084737"><span class="hs-identifier hs-var">hmi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-602"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-603"></span><span>         </span><span class="hs-glyph">!</span><span id="local-6989586621681084735"><span class="annot"><span class="annottext">hpt :: HomePackageTable
</span><a href="#local-6989586621681084735"><span class="hs-identifier hs-var hs-var">hpt</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(HomeModInfo -&gt; Bool) -&gt; HomePackageTable -&gt; Bool
</span><a href="GHC.Driver.Types.html#anyHpt"><span class="hs-identifier hs-var">anyHpt</span></a></span><span> </span><span class="annot"><span class="annottext">HomeModInfo -&gt; Bool
</span><a href="#local-6989586621681084738"><span class="hs-identifier hs-var">keepFor20509</span></a></span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084755"><span class="hs-identifier hs-var">hsc_HPT</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084755"><span class="hs-identifier hs-var">hsc_HPT</span></a></span><span>
</span><span id="line-604"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="GHC.Driver.Types.html#emptyHomePackageTable"><span class="hs-identifier hs-var">emptyHomePackageTable</span></a></span><span>
</span><span id="line-605"></span><span>       </span><span class="hs-keyword">in</span><span>
</span><span id="line-606"></span><span>       </span><span class="annot"><span class="annottext">HscEnv :: DynFlags
-&gt; [Target]
-&gt; ModuleGraph
-&gt; InteractiveContext
-&gt; HomePackageTable
-&gt; IORef ExternalPackageState
-&gt; IORef NameCache
-&gt; IORef FinderCache
-&gt; Maybe (Module, IORef TypeEnv)
-&gt; Maybe Interp
-&gt; DynLinker
-&gt; HscEnv
</span><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-special">{</span><span>  </span><span class="annot"><span class="annottext">hsc_targets :: [Target]
</span><a href="GHC.Driver.Types.html#hsc_targets"><span class="hs-identifier hs-var">hsc_targets</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Target]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cleanTopEnv: hsc_targets&quot;</span></span><span>
</span><span id="line-607"></span><span>              </span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">hsc_mod_graph :: ModuleGraph
</span><a href="GHC.Driver.Types.html#hsc_mod_graph"><span class="hs-identifier hs-var">hsc_mod_graph</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ModuleGraph
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cleanTopEnv: hsc_mod_graph&quot;</span></span><span>
</span><span id="line-608"></span><span>              </span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">hsc_IC :: InteractiveContext
</span><a href="GHC.Driver.Types.html#hsc_IC"><span class="hs-identifier hs-var">hsc_IC</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; InteractiveContext
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cleanTopEnv: hsc_IC&quot;</span></span><span>
</span><span id="line-609"></span><span>              </span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">hsc_HPT :: HomePackageTable
</span><a href="GHC.Driver.Types.html#hsc_HPT"><span class="hs-identifier hs-var">hsc_HPT</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084735"><span class="hs-identifier hs-var">hpt</span></a></span><span>
</span><span id="line-610"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Module, IORef TypeEnv)
Maybe Interp
IORef FinderCache
IORef NameCache
IORef ExternalPackageState
DynFlags
DynLinker
hsc_type_env_var :: Maybe (Module, IORef TypeEnv)
hsc_interp :: Maybe Interp
hsc_dynLinker :: DynLinker
hsc_NC :: IORef NameCache
hsc_FC :: IORef FinderCache
hsc_EPS :: IORef ExternalPackageState
hsc_dynLinker :: DynLinker
hsc_interp :: Maybe Interp
hsc_type_env_var :: Maybe (Module, IORef TypeEnv)
hsc_FC :: IORef FinderCache
hsc_NC :: IORef NameCache
hsc_EPS :: IORef ExternalPackageState
hsc_dflags :: DynFlags
hsc_dflags :: DynFlags
</span><a href="GHC.Driver.Types.html#hsc_type_env_var"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-611"></span><span>
</span><span id="line-612"></span><span>  </span><span class="annot"><span class="annottext">(HscEnv -&gt; HscEnv) -&gt; IfL a -&gt; IfL a
forall gbl lcl a.
(HscEnv -&gt; HscEnv) -&gt; TcRnIf gbl lcl a -&gt; TcRnIf gbl lcl a
</span><a href="GHC.Tc.Utils.Monad.html#updTopEnv"><span class="hs-identifier hs-var">updTopEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; HscEnv
</span><a href="#local-6989586621681084761"><span class="hs-identifier hs-var">cleanTopEnv</span></a></span><span> </span><span class="annot"><span class="annottext">(IfL a -&gt; IfL a) -&gt; IfL a -&gt; IfL a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-613"></span><span>  </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">HscEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf IfGblEnv IfLclEnv HscEnv
forall gbl lcl. TcRnIf gbl lcl HscEnv
</span><a href="GHC.Tc.Utils.Monad.html#getTopEnv"><span class="hs-identifier hs-var">getTopEnv</span></a></span><span>        </span><span class="hs-comment">-- force the updTopEnv</span><span>
</span><span id="line-614"></span><span>  </span><span class="annot"><span class="annottext">IfL a
</span><a href="#local-6989586621681084762"><span class="hs-identifier hs-var">thing_inside</span></a></span><span>
</span><span id="line-615"></span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span class="hs-comment">-- | Returns @True@ if a 'ModIface' comes from an external package.</span><span>
</span><span id="line-618"></span><span class="hs-comment">-- In this case, we should NOT load it into the EPS; the entities</span><span>
</span><span id="line-619"></span><span class="hs-comment">-- should instead come from the local merged signature interface.</span><span>
</span><span id="line-620"></span><span class="annot"><a href="GHC.Iface.Load.html#is_external_sig"><span class="hs-identifier hs-type">is_external_sig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-621"></span><span id="is_external_sig"><span class="annot"><span class="annottext">is_external_sig :: DynFlags -&gt; ModIface -&gt; Bool
</span><a href="GHC.Iface.Load.html#is_external_sig"><span class="hs-identifier hs-var hs-var">is_external_sig</span></a></span></span><span> </span><span id="local-6989586621681084731"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084731"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681084730"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084730"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-622"></span><span>    </span><span class="hs-comment">-- It's a signature iface...</span><span>
</span><span id="line-623"></span><span>    </span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_semantic_module"><span class="hs-identifier hs-var">mi_semantic_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084730"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084730"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-624"></span><span>    </span><span class="hs-comment">-- and it's not from the local package</span><span>
</span><span id="line-625"></span><span>    </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084730"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Unit
</span><a href="GHC.Driver.Session.html#homeUnit"><span class="hs-identifier hs-var">homeUnit</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084731"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-626"></span><span>
</span><span id="line-627"></span><span class="hs-comment">-- | This is an improved version of 'findAndReadIface' which can also</span><span>
</span><span id="line-628"></span><span class="hs-comment">-- handle the case when a user requests @p[A=&lt;B&gt;]:M@ but we only</span><span>
</span><span id="line-629"></span><span class="hs-comment">-- have an interface for @p[A=&lt;A&gt;]:M@ (the indefinite interface.</span><span>
</span><span id="line-630"></span><span class="hs-comment">-- If we are not trying to build code, we load the interface we have,</span><span>
</span><span id="line-631"></span><span class="hs-comment">-- *instantiating it* according to how the holes are specified.</span><span>
</span><span id="line-632"></span><span class="hs-comment">-- (Of course, if we're actually building code, this is a hard error.)</span><span>
</span><span id="line-633"></span><span class="hs-comment">--</span><span>
</span><span id="line-634"></span><span class="hs-comment">-- In the presence of holes, 'computeInterface' has an important invariant:</span><span>
</span><span id="line-635"></span><span class="hs-comment">-- to load module M, its set of transitively reachable requirements must</span><span>
</span><span id="line-636"></span><span class="hs-comment">-- have an up-to-date local hi file for that requirement.  Note that if</span><span>
</span><span id="line-637"></span><span class="hs-comment">-- we are loading the interface of a requirement, this does not</span><span>
</span><span id="line-638"></span><span class="hs-comment">-- apply to the requirement itself; e.g., @p[A=&lt;A&gt;]:A@ does not require</span><span>
</span><span id="line-639"></span><span class="hs-comment">-- A.hi to be up-to-date (and indeed, we MUST NOT attempt to read A.hi, unless</span><span>
</span><span id="line-640"></span><span class="hs-comment">-- we are actually typechecking p.)</span><span>
</span><span id="line-641"></span><span id="local-6989586621681085478"><span id="local-6989586621681085479"><span class="annot"><a href="GHC.Iface.Load.html#computeInterface"><span class="hs-identifier hs-type">computeInterface</span></a></span><span> </span><span class="hs-glyph">::</span><span>
</span><span id="line-642"></span><span>       </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#IsBootInterface"><span class="hs-identifier hs-type">IsBootInterface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-643"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRnIf"><span class="hs-identifier hs-type">TcRnIf</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085479"><span class="hs-identifier hs-type">gbl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085478"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-644"></span><span id="computeInterface"><span class="annot"><span class="annottext">computeInterface :: forall gbl lcl.
MsgDoc
-&gt; IsBootInterface
-&gt; Module
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="GHC.Iface.Load.html#computeInterface"><span class="hs-identifier hs-var hs-var">computeInterface</span></a></span></span><span> </span><span id="local-6989586621681084712"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084712"><span class="hs-identifier hs-var">doc_str</span></a></span></span><span> </span><span id="local-6989586621681084711"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084711"><span class="hs-identifier hs-var">hi_boot_file</span></a></span></span><span> </span><span id="local-6989586621681084710"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084710"><span class="hs-identifier hs-var">mod0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-645"></span><span>    </span><span class="hs-identifier">MASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isHoleModule</span><span> </span><span class="hs-identifier">mod0</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-646"></span><span>    </span><span id="local-6989586621681084709"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084709"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env gbl lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-647"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Module -&gt; (InstalledModule, Maybe InstantiatedModule)
</span><a href="GHC.Unit.Module.html#getModuleInstantiation"><span class="hs-identifier hs-var">getModuleInstantiation</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084710"><span class="hs-identifier hs-var">mod0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-648"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681084707"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084707"><span class="hs-identifier hs-var">imod</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084706"><span class="annot"><span class="annottext">InstantiatedModule
</span><a href="#local-6989586621681084706"><span class="hs-identifier hs-var">indef</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Unit.State.html#homeUnitIsIndefinite"><span class="hs-identifier hs-var">homeUnitIsIndefinite</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084709"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-649"></span><span>            </span><span id="local-6989586621681084704"><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084704"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall gbl lcl.
MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="GHC.Iface.Load.html#findAndReadIface"><span class="hs-identifier hs-var">findAndReadIface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084712"><span class="hs-identifier hs-var">doc_str</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084707"><span class="hs-identifier hs-var">imod</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084710"><span class="hs-identifier hs-var">mod0</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084711"><span class="hs-identifier hs-var">hi_boot_file</span></a></span><span>
</span><span id="line-650"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084704"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-651"></span><span>                </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084703"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084703"><span class="hs-identifier hs-var">iface0</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681084702"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084702"><span class="hs-identifier hs-var">path</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-652"></span><span>                    </span><span id="local-6989586621681084701"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084701"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf gbl lcl HscEnv
forall gbl lcl. TcRnIf gbl lcl HscEnv
</span><a href="GHC.Tc.Utils.Monad.html#getTopEnv"><span class="hs-identifier hs-var">getTopEnv</span></a></span><span>
</span><span id="line-653"></span><span>                    </span><span id="local-6989586621681084700"><span class="annot"><span class="annottext">Either ErrorMessages ModIface
</span><a href="#local-6989586621681084700"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (Either ErrorMessages ModIface)
-&gt; IOEnv (Env gbl lcl) (Either ErrorMessages ModIface)
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (Either ErrorMessages ModIface)
 -&gt; IOEnv (Env gbl lcl) (Either ErrorMessages ModIface))
-&gt; IO (Either ErrorMessages ModIface)
-&gt; IOEnv (Env gbl lcl) (Either ErrorMessages ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-654"></span><span>                        </span><span class="annot"><span class="annottext">HscEnv
-&gt; [(ModuleName, Module)]
-&gt; Maybe NameShape
-&gt; ModIface
-&gt; IO (Either ErrorMessages ModIface)
</span><a href="GHC.Iface.Rename.html#rnModIface"><span class="hs-identifier hs-var">rnModIface</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084701"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenInstantiatedUnit UnitId -&gt; [(ModuleName, Module)]
forall unit. GenInstantiatedUnit unit -&gt; GenInstantiations unit
</span><a href="GHC.Unit.Types.html#instUnitInsts"><span class="hs-identifier hs-var hs-var">instUnitInsts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstantiatedModule -&gt; GenInstantiatedUnit UnitId
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">InstantiatedModule
</span><a href="#local-6989586621681084706"><span class="hs-identifier hs-var">indef</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-655"></span><span>                                   </span><span class="annot"><span class="annottext">Maybe NameShape
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084703"><span class="hs-identifier hs-var">iface0</span></a></span><span>
</span><span id="line-656"></span><span>                    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either ErrorMessages ModIface
</span><a href="#local-6989586621681084700"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-657"></span><span>                        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621681084697"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084697"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModIface, String) -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084697"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084702"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-658"></span><span>                        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621681084696"><span class="annot"><span class="annottext">ErrorMessages
</span><a href="#local-6989586621681084696"><span class="hs-identifier hs-var">errs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO (MaybeErr MsgDoc (ModIface, String))
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (MaybeErr MsgDoc (ModIface, String))
 -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String)))
-&gt; (ErrorMessages -&gt; IO (MaybeErr MsgDoc (ModIface, String)))
-&gt; ErrorMessages
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SourceError -&gt; IO (MaybeErr MsgDoc (ModIface, String))
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">(SourceError -&gt; IO (MaybeErr MsgDoc (ModIface, String)))
-&gt; (ErrorMessages -&gt; SourceError)
-&gt; ErrorMessages
-&gt; IO (MaybeErr MsgDoc (ModIface, String))
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ErrorMessages -&gt; SourceError
</span><a href="GHC.Driver.Types.html#mkSrcErr"><span class="hs-identifier hs-var">mkSrcErr</span></a></span><span> </span><span class="annot"><span class="annottext">(ErrorMessages
 -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String)))
-&gt; ErrorMessages
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ErrorMessages
</span><a href="#local-6989586621681084696"><span class="hs-identifier hs-var">errs</span></a></span><span>
</span><span id="line-659"></span><span>                </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084692"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084692"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084692"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-660"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681084691"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084691"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe InstantiatedModule
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-661"></span><span>            </span><span class="annot"><span class="annottext">MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall gbl lcl.
MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="GHC.Iface.Load.html#findAndReadIface"><span class="hs-identifier hs-var">findAndReadIface</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084712"><span class="hs-identifier hs-var">doc_str</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084691"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084710"><span class="hs-identifier hs-var">mod0</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084711"><span class="hs-identifier hs-var">hi_boot_file</span></a></span><span>
</span><span id="line-662"></span><span>
</span><span id="line-663"></span><span class="hs-comment">-- | Compute the signatures which must be compiled in order to</span><span>
</span><span id="line-664"></span><span class="hs-comment">-- load the interface for a 'Module'.  The output of this function</span><span>
</span><span id="line-665"></span><span class="hs-comment">-- is always a subset of 'moduleFreeHoles'; it is more precise</span><span>
</span><span id="line-666"></span><span class="hs-comment">-- because in signature @p[A=\&lt;A&gt;,B=\&lt;B&gt;]:B@, although the free holes</span><span>
</span><span id="line-667"></span><span class="hs-comment">-- are A and B, B might not depend on A at all!</span><span>
</span><span id="line-668"></span><span class="hs-comment">--</span><span>
</span><span id="line-669"></span><span class="hs-comment">-- If this is invoked on a signature, this does NOT include the</span><span>
</span><span id="line-670"></span><span class="hs-comment">-- signature itself; e.g. precise free module holes of</span><span>
</span><span id="line-671"></span><span class="hs-comment">-- @p[A=\&lt;A&gt;,B=\&lt;B&gt;]:B@ never includes B.</span><span>
</span><span id="line-672"></span><span id="local-6989586621681085395"><span id="local-6989586621681085396"><span class="annot"><a href="GHC.Iface.Load.html#moduleFreeHolesPrecise"><span class="hs-identifier hs-type">moduleFreeHolesPrecise</span></a></span><span>
</span><span id="line-673"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-674"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRnIf"><span class="hs-identifier hs-type">TcRnIf</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085396"><span class="hs-identifier hs-type">gbl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085395"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.DSet.html#UniqDSet"><span class="hs-identifier hs-type">UniqDSet</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-675"></span><span id="moduleFreeHolesPrecise"><span class="annot"><span class="annottext">moduleFreeHolesPrecise :: forall gbl lcl.
MsgDoc
-&gt; Module -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (UniqDSet ModuleName))
</span><a href="GHC.Iface.Load.html#moduleFreeHolesPrecise"><span class="hs-identifier hs-var hs-var">moduleFreeHolesPrecise</span></a></span></span><span> </span><span id="local-6989586621681084679"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084679"><span class="hs-identifier hs-var">doc_str</span></a></span></span><span> </span><span id="local-6989586621681084678"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084678"><span class="hs-identifier hs-var">mod</span></a></span></span><span>
</span><span id="line-676"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
</span><a href="GHC.Unit.Module.html#moduleIsDefinite"><span class="hs-identifier hs-var">moduleIsDefinite</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084678"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (UniqDSet ModuleName)
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDSet ModuleName -&gt; MaybeErr MsgDoc (UniqDSet ModuleName)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName
forall a. UniqDSet a
</span><a href="GHC.Types.Unique.DSet.html#emptyUniqDSet"><span class="hs-identifier hs-var">emptyUniqDSet</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-677"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-678"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Module -&gt; (InstalledModule, Maybe InstantiatedModule)
</span><a href="GHC.Unit.Module.html#getModuleInstantiation"><span class="hs-identifier hs-var">getModuleInstantiation</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084678"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-679"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681084675"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084675"><span class="hs-identifier hs-var">imod</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084674"><span class="annot"><span class="annottext">InstantiatedModule
</span><a href="#local-6989586621681084674"><span class="hs-identifier hs-var">indef</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-680"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084673"><span class="annot"><span class="annottext">insts :: [(ModuleName, Module)]
</span><a href="#local-6989586621681084673"><span class="hs-identifier hs-var hs-var">insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenInstantiatedUnit UnitId -&gt; [(ModuleName, Module)]
forall unit. GenInstantiatedUnit unit -&gt; GenInstantiations unit
</span><a href="GHC.Unit.Types.html#instUnitInsts"><span class="hs-identifier hs-var hs-var">instUnitInsts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstantiatedModule -&gt; GenInstantiatedUnit UnitId
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">InstantiatedModule
</span><a href="#local-6989586621681084674"><span class="hs-identifier hs-var">indef</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-681"></span><span>        </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf gbl lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Considering whether to load&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084678"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-682"></span><span>                 </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;to compute precise free module holes&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-683"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681084672"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084672"><span class="hs-identifier hs-var">eps</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681084671"><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084671"><span class="hs-identifier hs-var">hpt</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf gbl lcl (ExternalPackageState, HomePackageTable)
forall gbl lcl.
TcRnIf gbl lcl (ExternalPackageState, HomePackageTable)
</span><a href="GHC.Tc.Utils.Monad.html#getEpsAndHpt"><span class="hs-identifier hs-var">getEpsAndHpt</span></a></span><span>
</span><span id="line-684"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
-&gt; HomePackageTable -&gt; Maybe (UniqDSet ModuleName)
</span><a href="#local-6989586621681084670"><span class="hs-identifier hs-var">tryEpsAndHpt</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084672"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084671"><span class="hs-identifier hs-var">hpt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (UniqDSet ModuleName)
-&gt; Maybe (UniqDSet ModuleName) -&gt; Maybe (UniqDSet ModuleName)
forall a. Maybe a -&gt; Maybe a -&gt; Maybe a
</span><a href="GHC.Data.Maybe.html#firstJust"><span class="hs-operator hs-var">`firstJust`</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
-&gt; InstalledModule
-&gt; [(ModuleName, Module)]
-&gt; Maybe (UniqDSet ModuleName)
</span><a href="#local-6989586621681084668"><span class="hs-identifier hs-var">tryDepsCache</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084672"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084675"><span class="hs-identifier hs-var">imod</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, Module)]
</span><a href="#local-6989586621681084673"><span class="hs-identifier hs-var">insts</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-685"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084667"><span class="annot"><span class="annottext">UniqDSet ModuleName
</span><a href="#local-6989586621681084667"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (UniqDSet ModuleName)
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDSet ModuleName -&gt; MaybeErr MsgDoc (UniqDSet ModuleName)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName
</span><a href="#local-6989586621681084667"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-686"></span><span>            </span><span class="annot"><span class="annottext">Maybe (UniqDSet ModuleName)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledModule
-&gt; [(ModuleName, Module)]
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
</span><a href="#local-6989586621681084666"><span class="hs-identifier hs-var">readAndCache</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084675"><span class="hs-identifier hs-var">imod</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, Module)]
</span><a href="#local-6989586621681084673"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-687"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledModule
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe InstantiatedModule
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (UniqDSet ModuleName)
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDSet ModuleName -&gt; MaybeErr MsgDoc (UniqDSet ModuleName)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName
forall a. UniqDSet a
</span><a href="GHC.Types.Unique.DSet.html#emptyUniqDSet"><span class="hs-identifier hs-var">emptyUniqDSet</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-688"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-689"></span><span>    </span><span id="local-6989586621681084670"><span class="annot"><span class="annottext">tryEpsAndHpt :: ExternalPackageState
-&gt; HomePackageTable -&gt; Maybe (UniqDSet ModuleName)
</span><a href="#local-6989586621681084670"><span class="hs-identifier hs-var hs-var">tryEpsAndHpt</span></a></span></span><span> </span><span id="local-6989586621681084665"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084665"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span id="local-6989586621681084664"><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084664"><span class="hs-identifier hs-var">hpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-690"></span><span>        </span><span class="annot"><span class="annottext">(ModIface -&gt; UniqDSet ModuleName)
-&gt; Maybe ModIface -&gt; Maybe (UniqDSet ModuleName)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; UniqDSet ModuleName
</span><a href="GHC.Driver.Types.html#mi_free_holes"><span class="hs-identifier hs-var">mi_free_holes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HomePackageTable -&gt; PackageIfaceTable -&gt; Module -&gt; Maybe ModIface
</span><a href="GHC.Driver.Types.html#lookupIfaceByModule"><span class="hs-identifier hs-var">lookupIfaceByModule</span></a></span><span> </span><span class="annot"><span class="annottext">HomePackageTable
</span><a href="#local-6989586621681084664"><span class="hs-identifier hs-var">hpt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var hs-var">eps_PIT</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084665"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084678"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-691"></span><span>    </span><span id="local-6989586621681084668"><span class="annot"><span class="annottext">tryDepsCache :: ExternalPackageState
-&gt; InstalledModule
-&gt; [(ModuleName, Module)]
-&gt; Maybe (UniqDSet ModuleName)
</span><a href="#local-6989586621681084668"><span class="hs-identifier hs-var hs-var">tryDepsCache</span></a></span></span><span> </span><span id="local-6989586621681084662"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084662"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span id="local-6989586621681084661"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084661"><span class="hs-identifier hs-var">imod</span></a></span></span><span> </span><span id="local-6989586621681084660"><span class="annot"><span class="annottext">[(ModuleName, Module)]
</span><a href="#local-6989586621681084660"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-692"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstalledModuleEnv (UniqDSet ModuleName)
-&gt; InstalledModule -&gt; Maybe (UniqDSet ModuleName)
forall a. InstalledModuleEnv a -&gt; InstalledModule -&gt; Maybe a
</span><a href="GHC.Unit.Module.Env.html#lookupInstalledModuleEnv"><span class="hs-identifier hs-var">lookupInstalledModuleEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; InstalledModuleEnv (UniqDSet ModuleName)
</span><a href="GHC.Driver.Types.html#eps_free_holes"><span class="hs-identifier hs-var hs-var">eps_free_holes</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084662"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084661"><span class="hs-identifier hs-var">imod</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-693"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084657"><span class="annot"><span class="annottext">UniqDSet ModuleName
</span><a href="#local-6989586621681084657"><span class="hs-identifier hs-var">ifhs</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName -&gt; Maybe (UniqDSet ModuleName)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDSet ModuleName
-&gt; [(ModuleName, Module)] -&gt; UniqDSet ModuleName
</span><a href="GHC.Driver.Types.html#renameFreeHoles"><span class="hs-identifier hs-var">renameFreeHoles</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName
</span><a href="#local-6989586621681084657"><span class="hs-identifier hs-var">ifhs</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, Module)]
</span><a href="#local-6989586621681084660"><span class="hs-identifier hs-var">insts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-694"></span><span>            </span><span id="local-6989586621681084655"><span class="annot"><span class="annottext">Maybe (UniqDSet ModuleName)
</span><a href="#local-6989586621681084655"><span class="hs-identifier hs-var">_otherwise</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (UniqDSet ModuleName)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-695"></span><span>    </span><span id="local-6989586621681084666"><span class="annot"><span class="annottext">readAndCache :: InstalledModule
-&gt; [(ModuleName, Module)]
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
</span><a href="#local-6989586621681084666"><span class="hs-identifier hs-var hs-var">readAndCache</span></a></span></span><span> </span><span id="local-6989586621681084654"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084654"><span class="hs-identifier hs-var">imod</span></a></span></span><span> </span><span id="local-6989586621681084653"><span class="annot"><span class="annottext">[(ModuleName, Module)]
</span><a href="#local-6989586621681084653"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-696"></span><span>        </span><span id="local-6989586621681084652"><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084652"><span class="hs-identifier hs-var">mb_iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall gbl lcl.
MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="GHC.Iface.Load.html#findAndReadIface"><span class="hs-identifier hs-var">findAndReadIface</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;moduleFreeHolesPrecise&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084679"><span class="hs-identifier hs-var">doc_str</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084654"><span class="hs-identifier hs-var">imod</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084678"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span>
</span><span id="line-697"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084652"><span class="hs-identifier hs-var">mb_iface</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-698"></span><span>            </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084650"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084650"><span class="hs-identifier hs-var">iface</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-699"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084649"><span class="annot"><span class="annottext">ifhs :: UniqDSet ModuleName
</span><a href="#local-6989586621681084649"><span class="hs-identifier hs-var hs-var">ifhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; UniqDSet ModuleName
</span><a href="GHC.Driver.Types.html#mi_free_holes"><span class="hs-identifier hs-var">mi_free_holes</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084650"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-700"></span><span>                </span><span class="hs-comment">-- Cache it</span><span>
</span><span id="line-701"></span><span>                </span><span class="annot"><span class="annottext">(ExternalPackageState -&gt; ExternalPackageState) -&gt; TcRnIf gbl lcl ()
forall gbl lcl.
(ExternalPackageState -&gt; ExternalPackageState) -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#updateEps_"><span class="hs-identifier hs-var">updateEps_</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681084648"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084648"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-702"></span><span>                    </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084648"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">eps_free_holes :: InstalledModuleEnv (UniqDSet ModuleName)
</span><a href="GHC.Driver.Types.html#eps_free_holes"><span class="hs-identifier hs-var">eps_free_holes</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledModuleEnv (UniqDSet ModuleName)
-&gt; InstalledModule
-&gt; UniqDSet ModuleName
-&gt; InstalledModuleEnv (UniqDSet ModuleName)
forall a.
InstalledModuleEnv a
-&gt; InstalledModule -&gt; a -&gt; InstalledModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#extendInstalledModuleEnv"><span class="hs-identifier hs-var">extendInstalledModuleEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; InstalledModuleEnv (UniqDSet ModuleName)
</span><a href="GHC.Driver.Types.html#eps_free_holes"><span class="hs-identifier hs-var hs-var">eps_free_holes</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084648"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084654"><span class="hs-identifier hs-var">imod</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName
</span><a href="#local-6989586621681084649"><span class="hs-identifier hs-var">ifhs</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-703"></span><span>                </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (UniqDSet ModuleName)
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDSet ModuleName -&gt; MaybeErr MsgDoc (UniqDSet ModuleName)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqDSet ModuleName
-&gt; [(ModuleName, Module)] -&gt; UniqDSet ModuleName
</span><a href="GHC.Driver.Types.html#renameFreeHoles"><span class="hs-identifier hs-var">renameFreeHoles</span></a></span><span> </span><span class="annot"><span class="annottext">UniqDSet ModuleName
</span><a href="#local-6989586621681084649"><span class="hs-identifier hs-var">ifhs</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, Module)]
</span><a href="#local-6989586621681084653"><span class="hs-identifier hs-var">insts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-704"></span><span>            </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084646"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084646"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (UniqDSet ModuleName)
-&gt; IOEnv (Env gbl lcl) (MaybeErr MsgDoc (UniqDSet ModuleName))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc (UniqDSet ModuleName)
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084646"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-705"></span><span>
</span><span id="line-706"></span><span class="annot"><a href="GHC.Iface.Load.html#wantHiBootFile"><span class="hs-identifier hs-type">wantHiBootFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ExternalPackageState"><span class="hs-identifier hs-type">ExternalPackageState</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#WhereFrom"><span class="hs-identifier hs-type">WhereFrom</span></a></span><span>
</span><span id="line-707"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#IsBootInterface"><span class="hs-identifier hs-type">IsBootInterface</span></a></span><span>
</span><span id="line-708"></span><span class="hs-comment">-- Figure out whether we want Foo.hi or Foo.hi-boot</span><span>
</span><span id="line-709"></span><span id="wantHiBootFile"><span class="annot"><span class="annottext">wantHiBootFile :: DynFlags
-&gt; ExternalPackageState
-&gt; Module
-&gt; WhereFrom
-&gt; MaybeErr MsgDoc IsBootInterface
</span><a href="GHC.Iface.Load.html#wantHiBootFile"><span class="hs-identifier hs-var hs-var">wantHiBootFile</span></a></span></span><span> </span><span id="local-6989586621681084645"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084645"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681084644"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084644"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span id="local-6989586621681084643"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084643"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681084642"><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084642"><span class="hs-identifier hs-var">from</span></a></span></span><span>
</span><span id="line-710"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="#local-6989586621681084642"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-711"></span><span>       </span><span class="annot"><a href="GHC.Tc.Types.html#ImportByUser"><span class="hs-identifier hs-type">ImportByUser</span></a></span><span> </span><span id="local-6989586621681084641"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084641"><span class="hs-identifier hs-var">usr_boot</span></a></span></span><span>
</span><span id="line-712"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084641"><span class="hs-identifier hs-var">usr_boot</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; IsBootInterface -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#IsBoot"><span class="hs-identifier hs-var">IsBoot</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084640"><span class="hs-identifier hs-var">this_package</span></a></span><span>
</span><span id="line-713"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc IsBootInterface
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#badSourceImport"><span class="hs-identifier hs-var">badSourceImport</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084643"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-714"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; MaybeErr MsgDoc IsBootInterface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084641"><span class="hs-identifier hs-var">usr_boot</span></a></span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span>       </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportByPlugin"><span class="hs-identifier hs-var">ImportByPlugin</span></a></span><span>
</span><span id="line-717"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; MaybeErr MsgDoc IsBootInterface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span>
</span><span id="line-718"></span><span>
</span><span id="line-719"></span><span>       </span><span class="annot"><span class="annottext">WhereFrom
</span><a href="GHC.Tc.Types.html#ImportBySystem"><span class="hs-identifier hs-var">ImportBySystem</span></a></span><span>
</span><span id="line-720"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084640"><span class="hs-identifier hs-var">this_package</span></a></span><span>   </span><span class="hs-comment">-- If the module to be imported is not from this package</span><span>
</span><span id="line-721"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; MaybeErr MsgDoc IsBootInterface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span> </span><span class="hs-comment">-- don't look it up in eps_is_boot, because that is keyed</span><span>
</span><span id="line-722"></span><span>                               </span><span class="hs-comment">-- on the ModuleName of *home-package* modules only.</span><span>
</span><span id="line-723"></span><span>                               </span><span class="hs-comment">-- We never import boot modules from other packages!</span><span>
</span><span id="line-724"></span><span>
</span><span id="line-725"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-726"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqFM ModuleName ModuleNameWithIsBoot
-&gt; ModuleName -&gt; Maybe ModuleNameWithIsBoot
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExternalPackageState -&gt; UniqFM ModuleName ModuleNameWithIsBoot
</span><a href="GHC.Driver.Types.html#eps_is_boot"><span class="hs-identifier hs-var hs-var">eps_is_boot</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084644"><span class="hs-identifier hs-var">eps</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084643"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-727"></span><span>                </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Types.html#GWIB"><span class="hs-identifier hs-type">GWIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">gwib_isBoot :: forall mod. GenWithIsBoot mod -&gt; IsBootInterface
</span><a href="GHC.Unit.Types.html#gwib_isBoot"><span class="hs-identifier hs-var">gwib_isBoot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084634"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084634"><span class="hs-identifier hs-var">is_boot</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-728"></span><span>                  </span><span class="annot"><span class="annottext">IsBootInterface -&gt; MaybeErr MsgDoc IsBootInterface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084634"><span class="hs-identifier hs-var">is_boot</span></a></span><span>
</span><span id="line-729"></span><span>                </span><span class="annot"><span class="annottext">Maybe ModuleNameWithIsBoot
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-730"></span><span>                  </span><span class="annot"><span class="annottext">IsBootInterface -&gt; MaybeErr MsgDoc IsBootInterface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span>
</span><span id="line-731"></span><span>                     </span><span class="hs-comment">-- The boot-ness of the requested interface,</span><span>
</span><span id="line-732"></span><span>                     </span><span class="hs-comment">-- based on the dependencies in directly-imported modules</span><span>
</span><span id="line-733"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-734"></span><span>    </span><span id="local-6989586621681084640"><span class="annot"><span class="annottext">this_package :: Bool
</span><a href="#local-6989586621681084640"><span class="hs-identifier hs-var hs-var">this_package</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Unit
</span><a href="GHC.Driver.Session.html#homeUnit"><span class="hs-identifier hs-var">homeUnit</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084645"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084643"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span class="annot"><a href="GHC.Iface.Load.html#badSourceImport"><span class="hs-identifier hs-type">badSourceImport</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-737"></span><span id="badSourceImport"><span class="annot"><span class="annottext">badSourceImport :: Module -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#badSourceImport"><span class="hs-identifier hs-var hs-var">badSourceImport</span></a></span></span><span> </span><span id="local-6989586621681084633"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084633"><span class="hs-identifier hs-var">mod</span></a></span></span><span>
</span><span id="line-738"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;You cannot {-# SOURCE #-} import a module from another package&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-739"></span><span>       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;but&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084633"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is from package&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-740"></span><span>          </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unit -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084633"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-741"></span><span>
</span><span id="line-742"></span><span class="hs-comment">-----------------------------------------------------</span><span>
</span><span id="line-743"></span><span class="hs-comment">--      Loading type/class/value decls</span><span>
</span><span id="line-744"></span><span class="hs-comment">-- We pass the full Module name here, replete with</span><span>
</span><span id="line-745"></span><span class="hs-comment">-- its package info, so that we can build a Name for</span><span>
</span><span id="line-746"></span><span class="hs-comment">-- each binder with the right package info in it</span><span>
</span><span id="line-747"></span><span class="hs-comment">-- All subsequent lookups, including crucially lookups during typechecking</span><span>
</span><span id="line-748"></span><span class="hs-comment">-- the declaration itself, will find the fully-glorious Name</span><span>
</span><span id="line-749"></span><span class="hs-comment">--</span><span>
</span><span id="line-750"></span><span class="hs-comment">-- We handle ATs specially.  They are not main declarations, but also not</span><span>
</span><span id="line-751"></span><span class="hs-comment">-- implicit things (in particular, adding them to `implicitTyThings' would mess</span><span>
</span><span id="line-752"></span><span class="hs-comment">-- things up in the renaming/type checking of source programs).</span><span>
</span><span id="line-753"></span><span class="hs-comment">-----------------------------------------------------</span><span>
</span><span id="line-754"></span><span>
</span><span id="line-755"></span><span class="annot"><a href="GHC.Iface.Load.html#addDeclsToPTE"><span class="hs-identifier hs-type">addDeclsToPTE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PackageTypeEnv"><span class="hs-identifier hs-type">PackageTypeEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PackageTypeEnv"><span class="hs-identifier hs-type">PackageTypeEnv</span></a></span><span>
</span><span id="line-756"></span><span id="addDeclsToPTE"><span class="annot"><span class="annottext">addDeclsToPTE :: TypeEnv -&gt; [(Name, TyThing)] -&gt; TypeEnv
</span><a href="GHC.Iface.Load.html#addDeclsToPTE"><span class="hs-identifier hs-var hs-var">addDeclsToPTE</span></a></span></span><span> </span><span id="local-6989586621681084628"><span class="annot"><span class="annottext">TypeEnv
</span><a href="#local-6989586621681084628"><span class="hs-identifier hs-var">pte</span></a></span></span><span> </span><span id="local-6989586621681084627"><span class="annot"><span class="annottext">[(Name, TyThing)]
</span><a href="#local-6989586621681084627"><span class="hs-identifier hs-var">things</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeEnv -&gt; [(Name, TyThing)] -&gt; TypeEnv
forall a. NameEnv a -&gt; [(Name, a)] -&gt; NameEnv a
</span><a href="GHC.Types.Name.Env.html#extendNameEnvList"><span class="hs-identifier hs-var">extendNameEnvList</span></a></span><span> </span><span class="annot"><span class="annottext">TypeEnv
</span><a href="#local-6989586621681084628"><span class="hs-identifier hs-var">pte</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, TyThing)]
</span><a href="#local-6989586621681084627"><span class="hs-identifier hs-var">things</span></a></span><span>
</span><span id="line-757"></span><span>
</span><span id="line-758"></span><span class="annot"><a href="GHC.Iface.Load.html#loadDecls"><span class="hs-identifier hs-type">loadDecls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-759"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-760"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfL"><span class="hs-identifier hs-type">IfL</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-761"></span><span id="loadDecls"><span class="annot"><span class="annottext">loadDecls :: Bool -&gt; [(Fingerprint, IfaceDecl)] -&gt; IfL [(Name, TyThing)]
</span><a href="GHC.Iface.Load.html#loadDecls"><span class="hs-identifier hs-var hs-var">loadDecls</span></a></span></span><span> </span><span id="local-6989586621681084625"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084625"><span class="hs-identifier hs-var">ignore_prags</span></a></span></span><span> </span><span id="local-6989586621681084624"><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681084624"><span class="hs-identifier hs-var">ver_decls</span></a></span></span><span>
</span><span id="line-762"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Fingerprint, IfaceDecl) -&gt; IfL [(Name, TyThing)])
-&gt; [(Fingerprint, IfaceDecl)] -&gt; IfL [(Name, TyThing)]
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m [b]) -&gt; [a] -&gt; m [b]
</span><a href="GHC.Utils.Monad.html#concatMapM"><span class="hs-identifier hs-var">concatMapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; (Fingerprint, IfaceDecl) -&gt; IfL [(Name, TyThing)]
</span><a href="GHC.Iface.Load.html#loadDecl"><span class="hs-identifier hs-var">loadDecl</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084625"><span class="hs-identifier hs-var">ignore_prags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Fingerprint, IfaceDecl)]
</span><a href="#local-6989586621681084624"><span class="hs-identifier hs-var">ver_decls</span></a></span><span>
</span><span id="line-763"></span><span>
</span><span id="line-764"></span><span class="annot"><a href="GHC.Iface.Load.html#loadDecl"><span class="hs-identifier hs-type">loadDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>                    </span><span class="hs-comment">-- Don't load pragmas into the decl pool</span><span>
</span><span id="line-765"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Fingerprint.Type.html#Fingerprint"><span class="hs-identifier hs-type">Fingerprint</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-766"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfL"><span class="hs-identifier hs-type">IfL</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- The list can be poked eagerly, but the</span><span>
</span><span id="line-767"></span><span>                                    </span><span class="hs-comment">-- TyThings are forkM'd thunks</span><span>
</span><span id="line-768"></span><span id="loadDecl"><span class="annot"><span class="annottext">loadDecl :: Bool -&gt; (Fingerprint, IfaceDecl) -&gt; IfL [(Name, TyThing)]
</span><a href="GHC.Iface.Load.html#loadDecl"><span class="hs-identifier hs-var hs-var">loadDecl</span></a></span></span><span> </span><span id="local-6989586621681084621"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084621"><span class="hs-identifier hs-var">ignore_prags</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084620"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084620"><span class="hs-identifier hs-var">_version</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681084619"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084619"><span class="hs-identifier hs-var">decl</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-769"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span>       </span><span class="hs-comment">-- Populate the name cache with final versions of all</span><span>
</span><span id="line-770"></span><span>                </span><span class="hs-comment">-- the names associated with the decl</span><span>
</span><span id="line-771"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084618"><span class="annot"><span class="annottext">main_name :: Name
</span><a href="#local-6989586621681084618"><span class="hs-identifier hs-var hs-var">main_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var hs-var">ifName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084619"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-772"></span><span>
</span><span id="line-773"></span><span>        </span><span class="hs-comment">-- Typecheck the thing, lazily</span><span>
</span><span id="line-774"></span><span>        </span><span class="hs-comment">-- NB. Firstly, the laziness is there in case we never need the</span><span>
</span><span id="line-775"></span><span>        </span><span class="hs-comment">-- declaration (in one-shot mode), and secondly it is there so that</span><span>
</span><span id="line-776"></span><span>        </span><span class="hs-comment">-- we don't look up the occurrence of a name before calling mk_new_bndr</span><span>
</span><span id="line-777"></span><span>        </span><span class="hs-comment">-- on the binder.  This is important because we must get the right name</span><span>
</span><span id="line-778"></span><span>        </span><span class="hs-comment">-- which includes its nameParent.</span><span>
</span><span id="line-779"></span><span>
</span><span id="line-780"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084616"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084616"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; IfL TyThing -&gt; IfL TyThing
forall a. MsgDoc -&gt; IfL a -&gt; IfL a
</span><a href="GHC.Tc.Utils.Monad.html#forkM"><span class="hs-identifier hs-var">forkM</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084614"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">(IfL TyThing -&gt; IfL TyThing) -&gt; IfL TyThing -&gt; IfL TyThing
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Name -&gt; IfL ()
</span><a href="GHC.Iface.Load.html#bumpDeclStats"><span class="hs-identifier hs-var">bumpDeclStats</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084618"><span class="hs-identifier hs-var">main_name</span></a></span><span>
</span><span id="line-781"></span><span>                                  </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IfaceDecl -&gt; IfL TyThing
</span><a href="GHC.IfaceToCore.html#tcIfaceDecl"><span class="hs-identifier hs-var">tcIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084621"><span class="hs-identifier hs-var">ignore_prags</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084619"><span class="hs-identifier hs-var">decl</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-782"></span><span>
</span><span id="line-783"></span><span>        </span><span class="hs-comment">-- Populate the type environment with the implicitTyThings too.</span><span>
</span><span id="line-784"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-785"></span><span>        </span><span class="hs-comment">-- Note [Tricky iface loop]</span><span>
</span><span id="line-786"></span><span>        </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-787"></span><span>        </span><span class="hs-comment">-- Summary: The delicate point here is that 'mini-env' must be</span><span>
</span><span id="line-788"></span><span>        </span><span class="hs-comment">-- buildable from 'thing' without demanding any of the things</span><span>
</span><span id="line-789"></span><span>        </span><span class="hs-comment">-- 'forkM'd by tcIfaceDecl.</span><span>
</span><span id="line-790"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-791"></span><span>        </span><span class="hs-comment">-- In more detail: Consider the example</span><span>
</span><span id="line-792"></span><span>        </span><span class="hs-comment">--      data T a = MkT { x :: T a }</span><span>
</span><span id="line-793"></span><span>        </span><span class="hs-comment">-- The implicitTyThings of T are:  [ &lt;datacon MkT&gt;, &lt;selector x&gt;]</span><span>
</span><span id="line-794"></span><span>        </span><span class="hs-comment">-- (plus their workers, wrappers, coercions etc etc)</span><span>
</span><span id="line-795"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-796"></span><span>        </span><span class="hs-comment">-- We want to return an environment</span><span>
</span><span id="line-797"></span><span>        </span><span class="hs-comment">--      [ &quot;MkT&quot; -&gt; &lt;datacon MkT&gt;, &quot;x&quot; -&gt; &lt;selector x&gt;, ... ]</span><span>
</span><span id="line-798"></span><span>        </span><span class="hs-comment">-- (where the &quot;MkT&quot; is the *Name* associated with MkT, etc.)</span><span>
</span><span id="line-799"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-800"></span><span>        </span><span class="hs-comment">-- We do this by mapping the implicit_names to the associated</span><span>
</span><span id="line-801"></span><span>        </span><span class="hs-comment">-- TyThings.  By the invariant on ifaceDeclImplicitBndrs and</span><span>
</span><span id="line-802"></span><span>        </span><span class="hs-comment">-- implicitTyThings, we can use getOccName on the implicit</span><span>
</span><span id="line-803"></span><span>        </span><span class="hs-comment">-- TyThings to make this association: each Name's OccName should</span><span>
</span><span id="line-804"></span><span>        </span><span class="hs-comment">-- be the OccName of exactly one implicitTyThing.  So the key is</span><span>
</span><span id="line-805"></span><span>        </span><span class="hs-comment">-- to define a &quot;mini-env&quot;</span><span>
</span><span id="line-806"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-807"></span><span>        </span><span class="hs-comment">-- [ 'MkT' -&gt; &lt;datacon MkT&gt;, 'x' -&gt; &lt;selector x&gt;, ... ]</span><span>
</span><span id="line-808"></span><span>        </span><span class="hs-comment">-- where the 'MkT' here is the *OccName* associated with MkT.</span><span>
</span><span id="line-809"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-810"></span><span>        </span><span class="hs-comment">-- However, there is a subtlety: due to how type checking needs</span><span>
</span><span id="line-811"></span><span>        </span><span class="hs-comment">-- to be staged, we can't poke on the forkM'd thunks inside the</span><span>
</span><span id="line-812"></span><span>        </span><span class="hs-comment">-- implicitTyThings while building this mini-env.</span><span>
</span><span id="line-813"></span><span>        </span><span class="hs-comment">-- If we poke these thunks too early, two problems could happen:</span><span>
</span><span id="line-814"></span><span>        </span><span class="hs-comment">--    (1) When processing mutually recursive modules across</span><span>
</span><span id="line-815"></span><span>        </span><span class="hs-comment">--        hs-boot boundaries, poking too early will do the</span><span>
</span><span id="line-816"></span><span>        </span><span class="hs-comment">--        type-checking before the recursive knot has been tied,</span><span>
</span><span id="line-817"></span><span>        </span><span class="hs-comment">--        so things will be type-checked in the wrong</span><span>
</span><span id="line-818"></span><span>        </span><span class="hs-comment">--        environment, and necessary variables won't be in</span><span>
</span><span id="line-819"></span><span>        </span><span class="hs-comment">--        scope.</span><span>
</span><span id="line-820"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-821"></span><span>        </span><span class="hs-comment">--    (2) Looking up one OccName in the mini_env will cause</span><span>
</span><span id="line-822"></span><span>        </span><span class="hs-comment">--        others to be looked up, which might cause that</span><span>
</span><span id="line-823"></span><span>        </span><span class="hs-comment">--        original one to be looked up again, and hence loop.</span><span>
</span><span id="line-824"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-825"></span><span>        </span><span class="hs-comment">-- The code below works because of the following invariant:</span><span>
</span><span id="line-826"></span><span>        </span><span class="hs-comment">-- getOccName on a TyThing does not force the suspended type</span><span>
</span><span id="line-827"></span><span>        </span><span class="hs-comment">-- checks in order to extract the name. For example, we don't</span><span>
</span><span id="line-828"></span><span>        </span><span class="hs-comment">-- poke on the &quot;T a&quot; type of &lt;selector x&gt; on the way to</span><span>
</span><span id="line-829"></span><span>        </span><span class="hs-comment">-- extracting &lt;selector x&gt;'s OccName. Of course, there is no</span><span>
</span><span id="line-830"></span><span>        </span><span class="hs-comment">-- reason in principle why getting the OccName should force the</span><span>
</span><span id="line-831"></span><span>        </span><span class="hs-comment">-- thunks, but this means we need to be careful in</span><span>
</span><span id="line-832"></span><span>        </span><span class="hs-comment">-- implicitTyThings and its helper functions.</span><span>
</span><span id="line-833"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-834"></span><span>        </span><span class="hs-comment">-- All a bit too finely-balanced for my liking.</span><span>
</span><span id="line-835"></span><span>
</span><span id="line-836"></span><span>        </span><span class="hs-comment">-- This mini-env and lookup function mediates between the</span><span>
</span><span id="line-837"></span><span>        </span><span class="hs-comment">--'Name's n and the map from 'OccName's to the implicit TyThings</span><span>
</span><span id="line-838"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084612"><span class="annot"><span class="annottext">mini_env :: OccEnv TyThing
</span><a href="#local-6989586621681084612"><span class="hs-identifier hs-var hs-var">mini_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OccName, TyThing)] -&gt; OccEnv TyThing
forall a. [(OccName, a)] -&gt; OccEnv a
</span><a href="GHC.Types.Name.Occurrence.html#mkOccEnv"><span class="hs-identifier hs-var">mkOccEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084609"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084609"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681084609"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084609"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; [TyThing]
</span><a href="GHC.Driver.Types.html#implicitTyThings"><span class="hs-identifier hs-var">implicitTyThings</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084616"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-839"></span><span>              </span><span id="local-6989586621681084607"><span class="annot"><span class="annottext">lookup :: Name -&gt; TyThing
</span><a href="#local-6989586621681084607"><span class="hs-identifier hs-var hs-var">lookup</span></a></span></span><span> </span><span id="local-6989586621681084606"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084606"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OccEnv TyThing -&gt; OccName -&gt; Maybe TyThing
forall a. OccEnv a -&gt; OccName -&gt; Maybe a
</span><a href="GHC.Types.Name.Occurrence.html#lookupOccEnv"><span class="hs-identifier hs-var">lookupOccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">OccEnv TyThing
</span><a href="#local-6989586621681084612"><span class="hs-identifier hs-var">mini_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084606"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-840"></span><span>                           </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084604"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084604"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084604"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-841"></span><span>                           </span><span class="annot"><span class="annottext">Maybe TyThing
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-842"></span><span>                             </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TyThing
forall a. HasCallStack =&gt; String -&gt; MsgDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;loadDecl&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084618"><span class="hs-identifier hs-var">main_name</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084606"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084619"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-843"></span><span>
</span><span id="line-844"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681084602"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084602"><span class="hs-identifier hs-var">implicit_names</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; IOEnv (Env IfGblEnv IfLclEnv) Name)
-&gt; [OccName] -&gt; IOEnv (Env IfGblEnv IfLclEnv) [Name]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; IOEnv (Env IfGblEnv IfLclEnv) Name
</span><a href="GHC.Iface.Env.html#lookupIfaceTop"><span class="hs-identifier hs-var">lookupIfaceTop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl -&gt; [OccName]
</span><a href="GHC.Iface.Syntax.html#ifaceDeclImplicitBndrs"><span class="hs-identifier hs-var">ifaceDeclImplicitBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084619"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-845"></span><span>
</span><span id="line-846"></span><span class="hs-comment">--         ; traceIf (text &quot;Loading decl for &quot; &lt;&gt; ppr main_name $$ ppr implicit_names)</span><span>
</span><span id="line-847"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[(Name, TyThing)] -&gt; IfL [(Name, TyThing)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">([(Name, TyThing)] -&gt; IfL [(Name, TyThing)])
-&gt; [(Name, TyThing)] -&gt; IfL [(Name, TyThing)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084618"><span class="hs-identifier hs-var">main_name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681084616"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Name, TyThing) -&gt; [(Name, TyThing)] -&gt; [(Name, TyThing)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span>
</span><span id="line-848"></span><span>                      </span><span class="hs-comment">-- uses the invariant that implicit_names and</span><span>
</span><span id="line-849"></span><span>                      </span><span class="hs-comment">-- implicitTyThings are bijective</span><span>
</span><span id="line-850"></span><span>                      </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084599"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name -&gt; TyThing
</span><a href="#local-6989586621681084607"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084599"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681084599"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084599"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084602"><span class="hs-identifier hs-var">implicit_names</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-851"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-852"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-853"></span><span>    </span><span id="local-6989586621681084614"><span class="annot"><span class="annottext">doc :: MsgDoc
</span><a href="#local-6989586621681084614"><span class="hs-identifier hs-var hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Declaration for&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl -&gt; Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var hs-var">ifName</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084619"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-854"></span><span>
</span><span id="line-855"></span><span class="annot"><a href="GHC.Iface.Load.html#bumpDeclStats"><span class="hs-identifier hs-type">bumpDeclStats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#IfL"><span class="hs-identifier hs-type">IfL</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>         </span><span class="hs-comment">-- Record that one more declaration has actually been used</span><span>
</span><span id="line-856"></span><span id="bumpDeclStats"><span class="annot"><span class="annottext">bumpDeclStats :: Name -&gt; IfL ()
</span><a href="GHC.Iface.Load.html#bumpDeclStats"><span class="hs-identifier hs-var hs-var">bumpDeclStats</span></a></span></span><span> </span><span id="local-6989586621681084598"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084598"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-857"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; IfL ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Loading decl for&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084598"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-858"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(ExternalPackageState -&gt; ExternalPackageState) -&gt; IfL ()
forall gbl lcl.
(ExternalPackageState -&gt; ExternalPackageState) -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#updateEps_"><span class="hs-identifier hs-var">updateEps_</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681084597"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084597"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084596"><span class="annot"><span class="annottext">stats :: EpsStats
</span><a href="#local-6989586621681084596"><span class="hs-identifier hs-var hs-var">stats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState -&gt; EpsStats
</span><a href="GHC.Driver.Types.html#eps_stats"><span class="hs-identifier hs-var hs-var">eps_stats</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084597"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-859"></span><span>                              </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084597"><span class="hs-identifier hs-var">eps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">eps_stats :: EpsStats
</span><a href="GHC.Driver.Types.html#eps_stats"><span class="hs-identifier hs-var">eps_stats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084596"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_decls_out :: Int
</span><a href="GHC.Driver.Types.html#n_decls_out"><span class="hs-identifier hs-var">n_decls_out</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_decls_out"><span class="hs-identifier hs-var hs-var">n_decls_out</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084596"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-860"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-861"></span><span>
</span><span id="line-862"></span><span class="hs-comment">{-
*********************************************************
*                                                      *
\subsection{Reading an interface file}
*                                                      *
*********************************************************

Note [Home module load error]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the sought-for interface is in the current package (as determined
by -package-name flag) then it jolly well should already be in the HPT
because we process home-package modules in dependency order.  (Except
in one-shot mode; see notes with hsc_HPT decl in GHC.Driver.Types).

It is possible (though hard) to get this error through user behaviour.
  * Suppose package P (modules P1, P2) depends on package Q (modules Q1,
    Q2, with Q2 importing Q1)
  * We compile both packages.
  * Now we edit package Q so that it somehow depends on P
  * Now recompile Q with --make (without recompiling P).
  * Then Q1 imports, say, P1, which in turn depends on Q2. So Q2
    is a home-package module which is not yet in the HPT!  Disaster.

This actually happened with P=base, Q=ghc-prim, via the AMP warnings.
See #8320.
-}</span><span>
</span><span id="line-888"></span><span>
</span><span id="line-889"></span><span id="local-6989586621681085407"><span id="local-6989586621681085408"><span class="annot"><a href="GHC.Iface.Load.html#findAndReadIface"><span class="hs-identifier hs-type">findAndReadIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-890"></span><span>                 </span><span class="hs-comment">-- The unique identifier of the on-disk module we're</span><span>
</span><span id="line-891"></span><span>                 </span><span class="hs-comment">-- looking for</span><span>
</span><span id="line-892"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#InstalledModule"><span class="hs-identifier hs-type">InstalledModule</span></a></span><span>
</span><span id="line-893"></span><span>                 </span><span class="hs-comment">-- The *actual* module we're looking for.  We use</span><span>
</span><span id="line-894"></span><span>                 </span><span class="hs-comment">-- this to check the consistency of the requirements</span><span>
</span><span id="line-895"></span><span>                 </span><span class="hs-comment">-- of the module we read out.</span><span>
</span><span id="line-896"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-897"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#IsBootInterface"><span class="hs-identifier hs-type">IsBootInterface</span></a></span><span>     </span><span class="hs-comment">-- True  &lt;=&gt; Look for a .hi-boot file</span><span>
</span><span id="line-898"></span><span>                                        </span><span class="hs-comment">-- False &lt;=&gt; Look for .hi file</span><span>
</span><span id="line-899"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRnIf"><span class="hs-identifier hs-type">TcRnIf</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085408"><span class="hs-identifier hs-type">gbl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085407"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-900"></span><span>        </span><span class="hs-comment">-- Nothing &lt;=&gt; file not found, or unreadable, or illegible</span><span>
</span><span id="line-901"></span><span>        </span><span class="hs-comment">-- Just x  &lt;=&gt; successfully found and parsed</span><span>
</span><span id="line-902"></span><span>
</span><span id="line-903"></span><span>        </span><span class="hs-comment">-- It *doesn't* add an error to the monad, because</span><span>
</span><span id="line-904"></span><span>        </span><span class="hs-comment">-- sometimes it's ok to fail... see notes with loadInterface</span><span>
</span><span id="line-905"></span><span id="findAndReadIface"><span class="annot"><span class="annottext">findAndReadIface :: forall gbl lcl.
MsgDoc
-&gt; InstalledModule
-&gt; Module
-&gt; IsBootInterface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="GHC.Iface.Load.html#findAndReadIface"><span class="hs-identifier hs-var hs-var">findAndReadIface</span></a></span></span><span> </span><span id="local-6989586621681084553"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084553"><span class="hs-identifier hs-var">doc_str</span></a></span></span><span> </span><span id="local-6989586621681084552"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084552"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681084551"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084551"><span class="hs-identifier hs-var">wanted_mod_with_insts</span></a></span></span><span> </span><span id="local-6989586621681084550"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084550"><span class="hs-identifier hs-var">hi_boot_file</span></a></span></span><span>
</span><span id="line-906"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf gbl lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Reading&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-907"></span><span>                           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084550"><span class="hs-identifier hs-var">hi_boot_file</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; IsBootInterface -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#IsBoot"><span class="hs-identifier hs-var">IsBoot</span></a></span><span>
</span><span id="line-908"></span><span>                             </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[boot]&quot;</span></span><span>
</span><span id="line-909"></span><span>                             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-910"></span><span>                           </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;interface for&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-911"></span><span>                           </span><span class="annot"><span class="annottext">InstalledModule -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084552"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#semi"><span class="hs-identifier hs-var">semi</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-912"></span><span>                     </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;reason:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084553"><span class="hs-identifier hs-var">doc_str</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-913"></span><span>
</span><span id="line-914"></span><span>       </span><span class="hs-comment">-- Check for GHC.Prim, and return its static interface</span><span>
</span><span id="line-915"></span><span>       </span><span class="hs-comment">-- TODO: make this check a function</span><span>
</span><span id="line-916"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084552"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule -&gt; Module -&gt; Bool
</span><a href="GHC.Unit.Module.html#installedModuleEq"><span class="hs-operator hs-var">`installedModuleEq`</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>
</span><span id="line-917"></span><span>           </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-918"></span><span>               </span><span id="local-6989586621681084543"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084543"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Hooks -&gt; Maybe ModIface)
-&gt; ModIface -&gt; IOEnv (Env gbl lcl) ModIface
forall (f :: * -&gt; *) a.
(Functor f, HasDynFlags f) =&gt;
(Hooks -&gt; Maybe a) -&gt; a -&gt; f a
</span><a href="GHC.Driver.Hooks.html#getHooked"><span class="hs-identifier hs-var">getHooked</span></a></span><span> </span><span class="annot"><span class="annottext">Hooks -&gt; Maybe ModIface
</span><a href="GHC.Driver.Hooks.html#ghcPrimIfaceHook"><span class="hs-identifier hs-var hs-var">ghcPrimIfaceHook</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="GHC.Iface.Load.html#ghcPrimIface"><span class="hs-identifier hs-var">ghcPrimIface</span></a></span><span>
</span><span id="line-919"></span><span>               </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModIface, String) -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084543"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-920"></span><span>                                   </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&lt;built in interface for GHC.Prim&gt;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-921"></span><span>           </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-922"></span><span>               </span><span id="local-6989586621681084539"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084539"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env gbl lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-923"></span><span>               </span><span class="hs-comment">-- Look for the file</span><span>
</span><span id="line-924"></span><span>               </span><span id="local-6989586621681084538"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084538"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRnIf gbl lcl HscEnv
forall gbl lcl. TcRnIf gbl lcl HscEnv
</span><a href="GHC.Tc.Utils.Monad.html#getTopEnv"><span class="hs-identifier hs-var">getTopEnv</span></a></span><span>
</span><span id="line-925"></span><span>               </span><span id="local-6989586621681084537"><span class="annot"><span class="annottext">InstalledFindResult
</span><a href="#local-6989586621681084537"><span class="hs-identifier hs-var">mb_found</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO InstalledFindResult -&gt; IOEnv (Env gbl lcl) InstalledFindResult
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; InstalledModule -&gt; IO InstalledFindResult
</span><a href="GHC.Driver.Finder.html#findExactModule"><span class="hs-identifier hs-var">findExactModule</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084538"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084552"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-926"></span><span>               </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstalledFindResult
</span><a href="#local-6989586621681084537"><span class="hs-identifier hs-var">mb_found</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-927"></span><span>                   </span><span class="annot"><a href="GHC.Driver.Types.html#InstalledFound"><span class="hs-identifier hs-type">InstalledFound</span></a></span><span> </span><span id="local-6989586621681084534"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681084534"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681084533"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084533"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-928"></span><span>                       </span><span class="hs-comment">-- Found file, so read it</span><span>
</span><span id="line-929"></span><span>                       </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084532"><span class="annot"><span class="annottext">file_path :: String
</span><a href="#local-6989586621681084532"><span class="hs-identifier hs-var hs-var">file_path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; String -&gt; String
</span><a href="GHC.Unit.Module.Location.html#addBootSuffix_maybe"><span class="hs-identifier hs-var">addBootSuffix_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084550"><span class="hs-identifier hs-var">hi_boot_file</span></a></span><span>
</span><span id="line-930"></span><span>                                                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModLocation -&gt; String
</span><a href="GHC.Unit.Module.Location.html#ml_hi_file"><span class="hs-identifier hs-var hs-var">ml_hi_file</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681084534"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-931"></span><span>
</span><span id="line-932"></span><span>                       </span><span class="hs-comment">-- See Note [Home module load error]</span><span>
</span><span id="line-933"></span><span>                       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">InstalledModule -&gt; UnitId
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084533"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; Unit -&gt; Bool
</span><a href="GHC.Unit.Module.html#unitIdEq"><span class="hs-operator hs-var">`unitIdEq`</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Unit
</span><a href="GHC.Driver.Session.html#homeUnit"><span class="hs-identifier hs-var">homeUnit</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084539"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-934"></span><span>                          </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcMode -&gt; Bool
</span><a href="GHC.Driver.Session.html#isOneShot"><span class="hs-identifier hs-var">isOneShot</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; GhcMode
</span><a href="GHC.Driver.Session.html#ghcMode"><span class="hs-identifier hs-var hs-var">ghcMode</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084539"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-935"></span><span>                           </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledModule -&gt; ModLocation -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#homeModError"><span class="hs-identifier hs-var">homeModError</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084533"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681084534"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-936"></span><span>                           </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681084525"><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084525"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="#local-6989586621681084524"><span class="hs-identifier hs-var">read_file</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084532"><span class="hs-identifier hs-var">file_path</span></a></span><span>
</span><span id="line-937"></span><span>                                   </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String) -&gt; TcRnIf gbl lcl ()
</span><a href="#local-6989586621681084523"><span class="hs-identifier hs-var">checkBuildDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084525"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-938"></span><span>                                   </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084525"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-939"></span><span>                   </span><span id="local-6989586621681084522"><span class="annot"><span class="annottext">InstalledFindResult
</span><a href="#local-6989586621681084522"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-940"></span><span>                       </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf gbl lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;...not found&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-941"></span><span>                       </span><span id="local-6989586621681084521"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084521"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env gbl lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-942"></span><span>                       </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; ModuleName -&gt; InstalledFindResult -&gt; MsgDoc
</span><a href="GHC.Driver.Finder.html#cannotFindInterface"><span class="hs-identifier hs-var">cannotFindInterface</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084521"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-943"></span><span>                                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledModule -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084552"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">InstalledFindResult
</span><a href="#local-6989586621681084522"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-944"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681084524"><span class="annot"><span class="annottext">read_file :: String -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="#local-6989586621681084524"><span class="hs-identifier hs-var hs-var">read_file</span></a></span></span><span> </span><span id="local-6989586621681084519"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084519"><span class="hs-identifier hs-var">file_path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-945"></span><span>              </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf gbl lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;readIFace&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084519"><span class="hs-identifier hs-var">file_path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-946"></span><span>              </span><span class="hs-comment">-- Figure out what is recorded in mi_module.  If this is</span><span>
</span><span id="line-947"></span><span>              </span><span class="hs-comment">-- a fully definite interface, it'll match exactly, but</span><span>
</span><span id="line-948"></span><span>              </span><span class="hs-comment">-- if it's indefinite, the inside will be uninstantiated!</span><span>
</span><span id="line-949"></span><span>              </span><span id="local-6989586621681084518"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084518"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env gbl lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-950"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084517"><span class="annot"><span class="annottext">wanted_mod :: Module
</span><a href="#local-6989586621681084517"><span class="hs-identifier hs-var hs-var">wanted_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-951"></span><span>                    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Module -&gt; (InstalledModule, Maybe InstantiatedModule)
</span><a href="GHC.Unit.Module.html#getModuleInstantiation"><span class="hs-identifier hs-var">getModuleInstantiation</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084551"><span class="hs-identifier hs-var">wanted_mod_with_insts</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-952"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledModule
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe InstantiatedModule
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084551"><span class="hs-identifier hs-var">wanted_mod_with_insts</span></a></span><span>
</span><span id="line-953"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledModule
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084516"><span class="annot"><span class="annottext">InstantiatedModule
</span><a href="#local-6989586621681084516"><span class="hs-identifier hs-var">indef_mod</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-954"></span><span>                          </span><span class="annot"><span class="annottext">UnitState -&gt; InstantiatedModule -&gt; Module
</span><a href="GHC.Unit.State.html#instModuleToModule"><span class="hs-identifier hs-var">instModuleToModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; UnitState
</span><a href="GHC.Driver.Session.html#unitState"><span class="hs-identifier hs-var hs-var">unitState</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084518"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-955"></span><span>                            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstantiatedModule -&gt; InstantiatedModule
</span><a href="GHC.Unit.Module.html#uninstantiateInstantiatedModule"><span class="hs-identifier hs-var">uninstantiateInstantiatedModule</span></a></span><span> </span><span class="annot"><span class="annottext">InstantiatedModule
</span><a href="#local-6989586621681084516"><span class="hs-identifier hs-var">indef_mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-956"></span><span>              </span><span id="local-6989586621681084512"><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
</span><a href="#local-6989586621681084512"><span class="hs-identifier hs-var">read_result</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Module -&gt; String -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
forall gbl lcl.
Module -&gt; String -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#readIface"><span class="hs-identifier hs-var">readIface</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084517"><span class="hs-identifier hs-var">wanted_mod</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084519"><span class="hs-identifier hs-var">file_path</span></a></span><span>
</span><span id="line-957"></span><span>              </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
</span><a href="#local-6989586621681084512"><span class="hs-identifier hs-var">read_result</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-958"></span><span>                </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084511"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084511"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#badIfaceFile"><span class="hs-identifier hs-var">badIfaceFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084519"><span class="hs-identifier hs-var">file_path</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084511"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-959"></span><span>                </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span id="local-6989586621681084509"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084509"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModIface, String) -&gt; MaybeErr MsgDoc (ModIface, String)
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084509"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084519"><span class="hs-identifier hs-var">file_path</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-960"></span><span>                            </span><span class="hs-comment">-- Don't forget to fill in the package name...</span><span>
</span><span id="line-961"></span><span>          </span><span id="local-6989586621681084523"><span class="annot"><span class="annottext">checkBuildDynamicToo :: MaybeErr MsgDoc (ModIface, String) -&gt; TcRnIf gbl lcl ()
</span><a href="#local-6989586621681084523"><span class="hs-identifier hs-var hs-var">checkBuildDynamicToo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084508"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084508"><span class="hs-identifier hs-var">iface</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681084507"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084507"><span class="hs-identifier hs-var">filePath</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-962"></span><span>              </span><span id="local-6989586621681084506"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084506"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env gbl lcl) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-963"></span><span>              </span><span class="hs-comment">-- Indefinite interfaces are ALWAYS non-dynamic, and</span><span>
</span><span id="line-964"></span><span>              </span><span class="hs-comment">-- that's OK.</span><span>
</span><span id="line-965"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084505"><span class="annot"><span class="annottext">is_definite_iface :: Bool
</span><a href="#local-6989586621681084505"><span class="hs-identifier hs-var hs-var">is_definite_iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
</span><a href="GHC.Unit.Module.html#moduleIsDefinite"><span class="hs-identifier hs-var">moduleIsDefinite</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084508"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-966"></span><span>              </span><span class="annot"><span class="annottext">Bool -&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084505"><span class="hs-identifier hs-var">is_definite_iface</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ())
-&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-967"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
forall (m :: * -&gt; *). MonadIO m =&gt; DynFlags -&gt; m () -&gt; m ()
</span><a href="GHC.Driver.Session.html#whenGeneratingDynamicToo"><span class="hs-identifier hs-var">whenGeneratingDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084506"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ())
-&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
forall gbl lcl a. TcRnIf gbl lcl a -&gt; TcRnIf gbl lcl a
</span><a href="GHC.Tc.Utils.Monad.html#withDoDynamicToo"><span class="hs-identifier hs-var">withDoDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ())
-&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-968"></span><span>                  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084502"><span class="annot"><span class="annottext">ref :: IORef Bool
</span><a href="#local-6989586621681084502"><span class="hs-identifier hs-var hs-var">ref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; IORef Bool
</span><a href="GHC.Driver.Session.html#canGenerateDynamicToo"><span class="hs-identifier hs-var hs-var">canGenerateDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084506"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-969"></span><span>                      </span><span id="local-6989586621681084500"><span class="annot"><span class="annottext">dynFilePath :: String
</span><a href="#local-6989586621681084500"><span class="hs-identifier hs-var hs-var">dynFilePath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; String -&gt; String
</span><a href="GHC.Unit.Module.Location.html#addBootSuffix_maybe"><span class="hs-identifier hs-var">addBootSuffix_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084550"><span class="hs-identifier hs-var">hi_boot_file</span></a></span><span>
</span><span id="line-970"></span><span>                                  </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier hs-var">replaceExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084507"><span class="hs-identifier hs-var">filePath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; String
</span><a href="GHC.Driver.Session.html#dynHiSuf"><span class="hs-identifier hs-var hs-var">dynHiSuf</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084506"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-971"></span><span>                  </span><span id="local-6989586621681084497"><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084497"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, String))
</span><a href="#local-6989586621681084524"><span class="hs-identifier hs-var">read_file</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084500"><span class="hs-identifier hs-var">dynFilePath</span></a></span><span>
</span><span id="line-972"></span><span>                  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><a href="#local-6989586621681084497"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-973"></span><span>                      </span><span class="annot"><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-type">Succeeded</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084496"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084496"><span class="hs-identifier hs-var">dynIface</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-974"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var hs-var">mi_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084508"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; Fingerprint -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var hs-var">mi_mod_hash</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084496"><span class="hs-identifier hs-var">dynIface</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-975"></span><span>                          </span><span class="annot"><span class="annottext">() -&gt; TcRnIf gbl lcl ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-976"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-977"></span><span>                          </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf gbl lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Dynamic hash doesn't match&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-978"></span><span>                             </span><span class="annot"><span class="annottext">IO () -&gt; TcRnIf gbl lcl ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; TcRnIf gbl lcl ()) -&gt; IO () -&gt; TcRnIf gbl lcl ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621681084502"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-979"></span><span>                      </span><span class="annot"><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-type">Failed</span></a></span><span> </span><span id="local-6989586621681084492"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084492"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-980"></span><span>                          </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRnIf gbl lcl ()
forall m n. MsgDoc -&gt; TcRnIf m n ()
</span><a href="GHC.Tc.Utils.Monad.html#traceIf"><span class="hs-identifier hs-var">traceIf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Failed to load dynamic interface file:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084492"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-981"></span><span>                             </span><span class="annot"><span class="annottext">IO () -&gt; TcRnIf gbl lcl ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; TcRnIf gbl lcl ()) -&gt; IO () -&gt; TcRnIf gbl lcl ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool -&gt; Bool -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">IORef Bool
</span><a href="#local-6989586621681084502"><span class="hs-identifier hs-var">ref</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-982"></span><span>          </span><span class="annot"><a href="#local-6989586621681084523"><span class="hs-identifier hs-var">checkBuildDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc (ModIface, String)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRnIf gbl lcl ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-983"></span><span>
</span><span id="line-984"></span><span class="hs-comment">-- | Write interface file</span><span>
</span><span id="line-985"></span><span class="annot"><a href="GHC.Iface.Load.html#writeIface"><span class="hs-identifier hs-type">writeIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-986"></span><span id="writeIface"><span class="annot"><span class="annottext">writeIface :: DynFlags -&gt; String -&gt; ModIface -&gt; IO ()
</span><a href="GHC.Iface.Load.html#writeIface"><span class="hs-identifier hs-var hs-var">writeIface</span></a></span></span><span> </span><span id="local-6989586621681084491"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084491"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681084490"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084490"><span class="hs-identifier hs-var">hi_file_path</span></a></span></span><span> </span><span id="local-6989586621681084489"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084489"><span class="hs-identifier hs-var">new_iface</span></a></span></span><span>
</span><span id="line-987"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier hs-var">createDirectoryIfMissing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084490"><span class="hs-identifier hs-var">hi_file_path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-988"></span><span>         </span><span class="annot"><span class="annottext">DynFlags -&gt; String -&gt; ModIface -&gt; IO ()
</span><a href="GHC.Iface.Binary.html#writeBinIface"><span class="hs-identifier hs-var">writeBinIface</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084491"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084490"><span class="hs-identifier hs-var">hi_file_path</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084489"><span class="hs-identifier hs-var">new_iface</span></a></span><span>
</span><span id="line-989"></span><span>
</span><span id="line-990"></span><span class="hs-comment">-- @readIface@ tries just the one file.</span><span>
</span><span id="line-991"></span><span id="local-6989586621681085360"><span id="local-6989586621681085361"><span class="annot"><a href="GHC.Iface.Load.html#readIface"><span class="hs-identifier hs-type">readIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-992"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcRnIf"><span class="hs-identifier hs-type">TcRnIf</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085361"><span class="hs-identifier hs-type">gbl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085360"><span class="hs-identifier hs-type">lcl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Maybe.html#MaybeErr"><span class="hs-identifier hs-type">MaybeErr</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-993"></span><span>        </span><span class="hs-comment">-- Failed err    &lt;=&gt; file not found, or unreadable, or illegible</span><span>
</span><span id="line-994"></span><span>        </span><span class="hs-comment">-- Succeeded iface &lt;=&gt; successfully found and parsed</span><span>
</span><span id="line-995"></span><span>
</span><span id="line-996"></span><span id="readIface"><span class="annot"><span class="annottext">readIface :: forall gbl lcl.
Module -&gt; String -&gt; TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
</span><a href="GHC.Iface.Load.html#readIface"><span class="hs-identifier hs-var hs-var">readIface</span></a></span></span><span> </span><span id="local-6989586621681084478"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084478"><span class="hs-identifier hs-var">wanted_mod</span></a></span></span><span> </span><span id="local-6989586621681084477"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084477"><span class="hs-identifier hs-var">file_path</span></a></span></span><span>
</span><span id="line-997"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681084476"><span class="annot"><span class="annottext">Either SomeException ModIface
</span><a href="#local-6989586621681084476"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env gbl lcl) ModIface
-&gt; IOEnv (Env gbl lcl) (Either SomeException ModIface)
forall env r. IOEnv env r -&gt; IOEnv env (Either SomeException r)
</span><a href="GHC.Data.IOEnv.html#tryMostM"><span class="hs-identifier hs-var">tryMostM</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env gbl lcl) ModIface
 -&gt; IOEnv (Env gbl lcl) (Either SomeException ModIface))
-&gt; IOEnv (Env gbl lcl) ModIface
-&gt; IOEnv (Env gbl lcl) (Either SomeException ModIface)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-998"></span><span>                 </span><span class="annot"><span class="annottext">CheckHiWay
-&gt; TraceBinIFaceReading -&gt; String -&gt; IOEnv (Env gbl lcl) ModIface
forall a b.
CheckHiWay -&gt; TraceBinIFaceReading -&gt; String -&gt; TcRnIf a b ModIface
</span><a href="GHC.Iface.Binary.html#readBinIface"><span class="hs-identifier hs-var">readBinIface</span></a></span><span> </span><span class="annot"><span class="annottext">CheckHiWay
</span><a href="GHC.Iface.Binary.html#CheckHiWay"><span class="hs-identifier hs-var">CheckHiWay</span></a></span><span> </span><span class="annot"><span class="annottext">TraceBinIFaceReading
</span><a href="GHC.Iface.Binary.html#QuietBinIFaceReading"><span class="hs-identifier hs-var">QuietBinIFaceReading</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084477"><span class="hs-identifier hs-var">file_path</span></a></span><span>
</span><span id="line-999"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either SomeException ModIface
</span><a href="#local-6989586621681084476"><span class="hs-identifier hs-var">res</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1000"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621681084471"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084471"><span class="hs-identifier hs-var">iface</span></a></span></span><span>
</span><span id="line-1001"></span><span>                </span><span class="hs-comment">-- NB: This check is NOT just a sanity check, it is</span><span>
</span><span id="line-1002"></span><span>                </span><span class="hs-comment">-- critical for correctness of recompilation checking</span><span>
</span><span id="line-1003"></span><span>                </span><span class="hs-comment">-- (it lets us tell when -this-unit-id has changed.)</span><span>
</span><span id="line-1004"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084478"><span class="hs-identifier hs-var">wanted_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084470"><span class="hs-identifier hs-var">actual_mod</span></a></span><span>
</span><span id="line-1005"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; MaybeErr MsgDoc ModIface
forall err val. val -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Succeeded"><span class="hs-identifier hs-var">Succeeded</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084471"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1006"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc ModIface
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084469"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1007"></span><span>                </span><span class="hs-keyword">where</span><span>
</span><span id="line-1008"></span><span>                  </span><span id="local-6989586621681084470"><span class="annot"><span class="annottext">actual_mod :: Module
</span><a href="#local-6989586621681084470"><span class="hs-identifier hs-var hs-var">actual_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084471"><span class="hs-identifier hs-var">iface</span></a></span><span>
</span><span id="line-1009"></span><span>                  </span><span id="local-6989586621681084469"><span class="annot"><span class="annottext">err :: MsgDoc
</span><a href="#local-6989586621681084469"><span class="hs-identifier hs-var hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#hiModuleNameMismatchWarn"><span class="hs-identifier hs-var">hiModuleNameMismatchWarn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084478"><span class="hs-identifier hs-var">wanted_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084470"><span class="hs-identifier hs-var">actual_mod</span></a></span><span>
</span><span id="line-1010"></span><span>
</span><span id="line-1011"></span><span>            </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621681084467"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621681084467"><span class="hs-identifier hs-var">exn</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MaybeErr MsgDoc ModIface
-&gt; TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MaybeErr MsgDoc ModIface
forall err val. err -&gt; MaybeErr err val
</span><a href="GHC.Data.Maybe.html#Failed"><span class="hs-identifier hs-var">Failed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SomeException -&gt; String
forall e. Exception e =&gt; e -&gt; String
</span><a href="GHC.Utils.Panic.html#showException"><span class="hs-identifier hs-var">showException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621681084467"><span class="hs-identifier hs-var">exn</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1012"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-1013"></span><span>
</span><span id="line-1014"></span><span class="hs-comment">{-
*********************************************************
*                                                       *
        Wired-in interface for GHC.Prim
*                                                       *
*********************************************************
-}</span><span>
</span><span id="line-1021"></span><span>
</span><span id="line-1022"></span><span class="annot"><a href="GHC.Iface.Load.html#initExternalPackageState"><span class="hs-identifier hs-type">initExternalPackageState</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ExternalPackageState"><span class="hs-identifier hs-type">ExternalPackageState</span></a></span><span>
</span><span id="line-1023"></span><span id="initExternalPackageState"><span class="annot"><span class="annottext">initExternalPackageState :: DynFlags -&gt; ExternalPackageState
</span><a href="GHC.Iface.Load.html#initExternalPackageState"><span class="hs-identifier hs-var hs-var">initExternalPackageState</span></a></span></span><span> </span><span id="local-6989586621681084465"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084465"><span class="hs-identifier hs-var">dflags</span></a></span></span><span>
</span><span id="line-1024"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EPS :: UniqFM ModuleName ModuleNameWithIsBoot
-&gt; PackageIfaceTable
-&gt; InstalledModuleEnv (UniqDSet ModuleName)
-&gt; TypeEnv
-&gt; PackageInstEnv
-&gt; PackageFamInstEnv
-&gt; PackageRuleBase
-&gt; PackageAnnEnv
-&gt; PackageCompleteMatchMap
-&gt; ModuleEnv PackageFamInstEnv
-&gt; EpsStats
-&gt; ExternalPackageState
</span><a href="GHC.Driver.Types.html#EPS"><span class="hs-identifier hs-type">EPS</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1025"></span><span>      </span><span class="annot"><span class="annottext">eps_is_boot :: UniqFM ModuleName ModuleNameWithIsBoot
</span><a href="GHC.Driver.Types.html#eps_is_boot"><span class="hs-identifier hs-var">eps_is_boot</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM ModuleName ModuleNameWithIsBoot
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1026"></span><span>      </span><span class="annot"><span class="annottext">eps_PIT :: PackageIfaceTable
</span><a href="GHC.Driver.Types.html#eps_PIT"><span class="hs-identifier hs-var">eps_PIT</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIfaceTable
</span><a href="GHC.Driver.Types.html#emptyPackageIfaceTable"><span class="hs-identifier hs-var">emptyPackageIfaceTable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1027"></span><span>      </span><span class="annot"><span class="annottext">eps_free_holes :: InstalledModuleEnv (UniqDSet ModuleName)
</span><a href="GHC.Driver.Types.html#eps_free_holes"><span class="hs-identifier hs-var">eps_free_holes</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledModuleEnv (UniqDSet ModuleName)
forall a. InstalledModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#emptyInstalledModuleEnv"><span class="hs-identifier hs-var">emptyInstalledModuleEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1028"></span><span>      </span><span class="annot"><span class="annottext">eps_PTE :: TypeEnv
</span><a href="GHC.Driver.Types.html#eps_PTE"><span class="hs-identifier hs-var">eps_PTE</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeEnv
</span><a href="GHC.Driver.Types.html#emptyTypeEnv"><span class="hs-identifier hs-var">emptyTypeEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1029"></span><span>      </span><span class="annot"><span class="annottext">eps_inst_env :: PackageInstEnv
</span><a href="GHC.Driver.Types.html#eps_inst_env"><span class="hs-identifier hs-var">eps_inst_env</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageInstEnv
</span><a href="GHC.Core.InstEnv.html#emptyInstEnv"><span class="hs-identifier hs-var">emptyInstEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1030"></span><span>      </span><span class="annot"><span class="annottext">eps_fam_inst_env :: PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_fam_inst_env"><span class="hs-identifier hs-var">eps_fam_inst_env</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageFamInstEnv
</span><a href="GHC.Core.FamInstEnv.html#emptyFamInstEnv"><span class="hs-identifier hs-var">emptyFamInstEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1031"></span><span>      </span><span class="annot"><span class="annottext">eps_rule_base :: PackageRuleBase
</span><a href="GHC.Driver.Types.html#eps_rule_base"><span class="hs-identifier hs-var">eps_rule_base</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreRule] -&gt; PackageRuleBase
</span><a href="GHC.Core.Rules.html#mkRuleBase"><span class="hs-identifier hs-var">mkRuleBase</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681084457"><span class="hs-identifier hs-var">builtinRules'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1032"></span><span>        </span><span class="hs-comment">-- Initialise the EPS rule pool with the built-in rules</span><span>
</span><span id="line-1033"></span><span>      </span><span class="annot"><span class="annottext">eps_mod_fam_inst_env :: ModuleEnv PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_mod_fam_inst_env"><span class="hs-identifier hs-var">eps_mod_fam_inst_env</span></a></span><span>
</span><span id="line-1034"></span><span>                           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleEnv PackageFamInstEnv
forall a. ModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#emptyModuleEnv"><span class="hs-identifier hs-var">emptyModuleEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1035"></span><span>      </span><span class="annot"><span class="annottext">eps_complete_matches :: PackageCompleteMatchMap
</span><a href="GHC.Driver.Types.html#eps_complete_matches"><span class="hs-identifier hs-var">eps_complete_matches</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageCompleteMatchMap
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1036"></span><span>      </span><span class="annot"><span class="annottext">eps_ann_env :: PackageAnnEnv
</span><a href="GHC.Driver.Types.html#eps_ann_env"><span class="hs-identifier hs-var">eps_ann_env</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageAnnEnv
</span><a href="GHC.Types.Annotations.html#emptyAnnEnv"><span class="hs-identifier hs-var">emptyAnnEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1037"></span><span>      </span><span class="annot"><span class="annottext">eps_stats :: EpsStats
</span><a href="GHC.Driver.Types.html#eps_stats"><span class="hs-identifier hs-var">eps_stats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EpsStats :: Int -&gt; Int -&gt; Int -&gt; Int -&gt; Int -&gt; Int -&gt; Int -&gt; EpsStats
</span><a href="GHC.Driver.Types.html#EpsStats"><span class="hs-identifier hs-type">EpsStats</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_ifaces_in :: Int
</span><a href="GHC.Driver.Types.html#n_ifaces_in"><span class="hs-identifier hs-var">n_ifaces_in</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_decls_in :: Int
</span><a href="GHC.Driver.Types.html#n_decls_in"><span class="hs-identifier hs-var">n_decls_in</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_decls_out :: Int
</span><a href="GHC.Driver.Types.html#n_decls_out"><span class="hs-identifier hs-var">n_decls_out</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1038"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_insts_in :: Int
</span><a href="GHC.Driver.Types.html#n_insts_in"><span class="hs-identifier hs-var">n_insts_in</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_insts_out :: Int
</span><a href="GHC.Driver.Types.html#n_insts_out"><span class="hs-identifier hs-var">n_insts_out</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1039"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_rules_in :: Int
</span><a href="GHC.Driver.Types.html#n_rules_in"><span class="hs-identifier hs-var">n_rules_in</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreRule] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681084457"><span class="hs-identifier hs-var">builtinRules'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_rules_out :: Int
</span><a href="GHC.Driver.Types.html#n_rules_out"><span class="hs-identifier hs-var">n_rules_out</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1040"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-1041"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-1042"></span><span>      </span><span id="local-6989586621681084447"><span class="annot"><span class="annottext">enableBignumRules :: EnableBignumRules
</span><a href="#local-6989586621681084447"><span class="hs-identifier hs-var hs-var">enableBignumRules</span></a></span></span><span>
</span><span id="line-1043"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; UnitId
</span><a href="GHC.Driver.Session.html#homeUnitId"><span class="hs-identifier hs-var hs-var">homeUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084465"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; UnitId -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="GHC.Unit.Types.html#primUnitId"><span class="hs-identifier hs-var">primUnitId</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; EnableBignumRules
</span><a href="GHC.Core.Opt.ConstantFold.html#EnableBignumRules"><span class="hs-identifier hs-var">EnableBignumRules</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1044"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; UnitId
</span><a href="GHC.Driver.Session.html#homeUnitId"><span class="hs-identifier hs-var hs-var">homeUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084465"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; UnitId -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="GHC.Unit.Types.html#bignumUnitId"><span class="hs-identifier hs-var">bignumUnitId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; EnableBignumRules
</span><a href="GHC.Core.Opt.ConstantFold.html#EnableBignumRules"><span class="hs-identifier hs-var">EnableBignumRules</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1045"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; EnableBignumRules
</span><a href="GHC.Core.Opt.ConstantFold.html#EnableBignumRules"><span class="hs-identifier hs-var">EnableBignumRules</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1046"></span><span>      </span><span id="local-6989586621681084457"><span class="annot"><span class="annottext">builtinRules' :: [CoreRule]
</span><a href="#local-6989586621681084457"><span class="hs-identifier hs-var hs-var">builtinRules'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EnableBignumRules -&gt; [CoreRule]
</span><a href="GHC.Core.Opt.ConstantFold.html#builtinRules"><span class="hs-identifier hs-var">builtinRules</span></a></span><span> </span><span class="annot"><span class="annottext">EnableBignumRules
</span><a href="#local-6989586621681084447"><span class="hs-identifier hs-var">enableBignumRules</span></a></span><span>
</span><span id="line-1047"></span><span>
</span><span id="line-1048"></span><span class="hs-comment">{-
*********************************************************
*                                                       *
        Wired-in interface for GHC.Prim
*                                                       *
*********************************************************
-}</span><span>
</span><span id="line-1055"></span><span>
</span><span id="line-1056"></span><span class="annot"><a href="GHC.Iface.Load.html#ghcPrimIface"><span class="hs-identifier hs-type">ghcPrimIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-1057"></span><span id="ghcPrimIface"><span class="annot"><span class="annottext">ghcPrimIface :: ModIface
</span><a href="GHC.Iface.Load.html#ghcPrimIface"><span class="hs-identifier hs-var hs-var">ghcPrimIface</span></a></span></span><span>
</span><span id="line-1058"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084441"><span class="hs-identifier hs-var">empty_iface</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1059"></span><span>        </span><span class="annot"><span class="annottext">mi_exports :: [IfaceExport]
</span><a href="GHC.Driver.Types.html#mi_exports"><span class="hs-identifier hs-var">mi_exports</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceExport]
</span><a href="GHC.Builtin.Utils.html#ghcPrimExports"><span class="hs-identifier hs-var">ghcPrimExports</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1060"></span><span>        </span><span class="annot"><span class="annottext">mi_decls :: [IfaceDeclExts 'ModIfaceFinal]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var">mi_decls</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1061"></span><span>        </span><span class="annot"><span class="annottext">mi_fixities :: [(OccName, Fixity)]
</span><a href="GHC.Driver.Types.html#mi_fixities"><span class="hs-identifier hs-var">mi_fixities</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)]
</span><a href="#local-6989586621681084437"><span class="hs-identifier hs-var">fixities</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1062"></span><span>        </span><span class="annot"><span class="annottext">mi_final_exts :: IfaceBackendExts 'ModIfaceFinal
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var">mi_final_exts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceBackendExts 'ModIfaceFinal
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var hs-var">mi_final_exts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084441"><span class="hs-identifier hs-var">empty_iface</span></a></span><span class="hs-special">)</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mi_fix_fn :: OccName -&gt; Maybe Fixity
</span><a href="GHC.Driver.Types.html#mi_fix_fn"><span class="hs-identifier hs-var">mi_fix_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)] -&gt; OccName -&gt; Maybe Fixity
</span><a href="GHC.Driver.Types.html#mkIfaceFixCache"><span class="hs-identifier hs-var">mkIfaceFixCache</span></a></span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)]
</span><a href="#local-6989586621681084437"><span class="hs-identifier hs-var">fixities</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-1063"></span><span>        </span><span class="annot"><span class="annottext">mi_decl_docs :: DeclDocMap
</span><a href="GHC.Driver.Types.html#mi_decl_docs"><span class="hs-identifier hs-var">mi_decl_docs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DeclDocMap
</span><a href="GHC.Builtin.Utils.html#ghcPrimDeclDocs"><span class="hs-identifier hs-var">ghcPrimDeclDocs</span></a></span><span> </span><span class="hs-comment">-- See Note [GHC.Prim Docs]</span><span>
</span><span id="line-1064"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-1065"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1066"></span><span>    </span><span id="local-6989586621681084441"><span class="annot"><span class="annottext">empty_iface :: ModIface
</span><a href="#local-6989586621681084441"><span class="hs-identifier hs-var hs-var">empty_iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; ModIface
</span><a href="GHC.Driver.Types.html#emptyFullModIface"><span class="hs-identifier hs-var">emptyFullModIface</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>
</span><span id="line-1067"></span><span>
</span><span id="line-1068"></span><span>    </span><span class="hs-comment">-- The fixities listed here for @`seq`@ or @-&gt;@ should match</span><span>
</span><span id="line-1069"></span><span>    </span><span class="hs-comment">-- those in primops.txt.pp (from which Haddock docs are generated).</span><span>
</span><span id="line-1070"></span><span>    </span><span id="local-6989586621681084437"><span class="annot"><span class="annottext">fixities :: [(OccName, Fixity)]
</span><a href="#local-6989586621681084437"><span class="hs-identifier hs-var hs-var">fixities</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier hs-var">seqId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SourceText -&gt; Int -&gt; FixityDirection -&gt; Fixity
</span><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-var">Fixity</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><a href="GHC.Types.Basic.html#NoSourceText"><span class="hs-identifier hs-var">NoSourceText</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="GHC.Types.Basic.html#InfixR"><span class="hs-identifier hs-var">InfixR</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1071"></span><span>             </span><span class="annot"><span class="annottext">(OccName, Fixity) -&gt; [(OccName, Fixity)] -&gt; [(OccName, Fixity)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(PrimOp -&gt; Maybe (OccName, Fixity))
-&gt; [PrimOp] -&gt; [(OccName, Fixity)]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Maybe (OccName, Fixity)
</span><a href="#local-6989586621681084426"><span class="hs-identifier hs-var">mkFixity</span></a></span><span> </span><span class="annot"><span class="annottext">[PrimOp]
</span><a href="GHC.Builtin.PrimOps.html#allThePrimOps"><span class="hs-identifier hs-var">allThePrimOps</span></a></span><span>
</span><span id="line-1072"></span><span>    </span><span id="local-6989586621681084426"><span class="annot"><span class="annottext">mkFixity :: PrimOp -&gt; Maybe (OccName, Fixity)
</span><a href="#local-6989586621681084426"><span class="hs-identifier hs-var hs-var">mkFixity</span></a></span></span><span> </span><span id="local-6989586621681084424"><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621681084424"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrimOp -&gt; OccName
</span><a href="GHC.Builtin.PrimOps.html#primOpOcc"><span class="hs-identifier hs-var">primOpOcc</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621681084424"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Fixity -&gt; (OccName, Fixity))
-&gt; Maybe Fixity -&gt; Maybe (OccName, Fixity)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Maybe Fixity
</span><a href="GHC.Builtin.PrimOps.html#primOpFixity"><span class="hs-identifier hs-var">primOpFixity</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621681084424"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-1073"></span><span>
</span><span id="line-1074"></span><span class="hs-comment">{-
*********************************************************
*                                                      *
\subsection{Statistics}
*                                                      *
*********************************************************
-}</span><span>
</span><span id="line-1081"></span><span>
</span><span id="line-1082"></span><span class="annot"><a href="GHC.Iface.Load.html#ifaceStats"><span class="hs-identifier hs-type">ifaceStats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ExternalPackageState"><span class="hs-identifier hs-type">ExternalPackageState</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1083"></span><span id="ifaceStats"><span class="annot"><span class="annottext">ifaceStats :: ExternalPackageState -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#ifaceStats"><span class="hs-identifier hs-var hs-var">ifaceStats</span></a></span></span><span> </span><span id="local-6989586621681084423"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084423"><span class="hs-identifier hs-var">eps</span></a></span></span><span>
</span><span id="line-1084"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Renamer stats: &quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084421"><span class="hs-identifier hs-var">msg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1085"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1086"></span><span>    </span><span id="local-6989586621681084420"><span class="annot"><span class="annottext">stats :: EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var hs-var">stats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExternalPackageState -&gt; EpsStats
</span><a href="GHC.Driver.Types.html#eps_stats"><span class="hs-identifier hs-var hs-var">eps_stats</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621681084423"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-1087"></span><span>    </span><span id="local-6989586621681084421"><span class="annot"><span class="annottext">msg :: MsgDoc
</span><a href="#local-6989586621681084421"><span class="hs-identifier hs-var hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-1088"></span><span>        </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_ifaces_in"><span class="hs-identifier hs-var hs-var">n_ifaces_in</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;interfaces read&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1089"></span><span>         </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_decls_out"><span class="hs-identifier hs-var hs-var">n_decls_out</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;type/class/variable imported, out of&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1090"></span><span>                </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_decls_in"><span class="hs-identifier hs-var hs-var">n_decls_in</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;read&quot;</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1091"></span><span>         </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_insts_out"><span class="hs-identifier hs-var hs-var">n_insts_out</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;instance decls imported, out of&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1092"></span><span>                </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_insts_in"><span class="hs-identifier hs-var hs-var">n_insts_in</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;read&quot;</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1093"></span><span>         </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_rules_out"><span class="hs-identifier hs-var hs-var">n_rules_out</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rule decls imported, out of&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1094"></span><span>                </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EpsStats -&gt; Int
</span><a href="GHC.Driver.Types.html#n_rules_in"><span class="hs-identifier hs-var hs-var">n_rules_in</span></a></span><span> </span><span class="annot"><span class="annottext">EpsStats
</span><a href="#local-6989586621681084420"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;read&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-1095"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-1096"></span><span>
</span><span id="line-1097"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
                Printing interfaces
*                                                                      *
************************************************************************

Note [Name qualification with --show-iface]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In order to disambiguate between identifiers from different modules, we qualify
all names that don't originate in the current module. In order to keep visual
noise as low as possible, we keep local names unqualified.

For some background on this choice see trac #15269.
-}</span><span>
</span><span id="line-1113"></span><span>
</span><span id="line-1114"></span><span class="hs-comment">-- | Read binary interface, and print it out</span><span>
</span><span id="line-1115"></span><span class="annot"><a href="GHC.Iface.Load.html#showIface"><span class="hs-identifier hs-type">showIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1116"></span><span id="showIface"><span class="annot"><span class="annottext">showIface :: HscEnv -&gt; String -&gt; IO ()
</span><a href="GHC.Iface.Load.html#showIface"><span class="hs-identifier hs-var hs-var">showIface</span></a></span></span><span> </span><span id="local-6989586621681084418"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084418"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681084417"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084417"><span class="hs-identifier hs-var">filename</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1117"></span><span>   </span><span class="hs-comment">-- skip the hi way check; we don't want to worry about profiled vs.</span><span>
</span><span id="line-1118"></span><span>   </span><span class="hs-comment">-- non-profiled interfaces, for example.</span><span>
</span><span id="line-1119"></span><span>   </span><span id="local-6989586621681084416"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084416"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; HscEnv -&gt; () -&gt; () -&gt; TcRnIf () () ModIface -&gt; IO ModIface
forall gbl lcl a.
Char -&gt; HscEnv -&gt; gbl -&gt; lcl -&gt; TcRnIf gbl lcl a -&gt; IO a
</span><a href="GHC.Tc.Utils.Monad.html#initTcRnIf"><span class="hs-identifier hs-var">initTcRnIf</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'s'</span></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084418"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TcRnIf () () ModIface -&gt; IO ModIface)
-&gt; TcRnIf () () ModIface -&gt; IO ModIface
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1120"></span><span>       </span><span class="annot"><span class="annottext">CheckHiWay
-&gt; TraceBinIFaceReading -&gt; String -&gt; TcRnIf () () ModIface
forall a b.
CheckHiWay -&gt; TraceBinIFaceReading -&gt; String -&gt; TcRnIf a b ModIface
</span><a href="GHC.Iface.Binary.html#readBinIface"><span class="hs-identifier hs-var">readBinIface</span></a></span><span> </span><span class="annot"><span class="annottext">CheckHiWay
</span><a href="GHC.Iface.Binary.html#IgnoreHiWay"><span class="hs-identifier hs-var">IgnoreHiWay</span></a></span><span> </span><span class="annot"><span class="annottext">TraceBinIFaceReading
</span><a href="GHC.Iface.Binary.html#TraceBinIFaceReading"><span class="hs-identifier hs-var">TraceBinIFaceReading</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084417"><span class="hs-identifier hs-var">filename</span></a></span><span>
</span><span id="line-1121"></span><span>   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681084412"><span class="annot"><span class="annottext">dflags :: DynFlags
</span><a href="#local-6989586621681084412"><span class="hs-identifier hs-var hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681084418"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-1122"></span><span>       </span><span class="hs-comment">-- See Note [Name qualification with --show-iface]</span><span>
</span><span id="line-1123"></span><span>       </span><span id="local-6989586621681084411"><span class="annot"><span class="annottext">qualifyImportedNames :: Module -&gt; OccName -&gt; QualifyName
</span><a href="#local-6989586621681084411"><span class="hs-identifier hs-var hs-var">qualifyImportedNames</span></a></span></span><span> </span><span id="local-6989586621681084410"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084410"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="annot"><span class="annottext">OccName
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-1124"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084410"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084416"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualifyName
</span><a href="GHC.Utils.Outputable.html#NameUnqual"><span class="hs-identifier hs-var">NameUnqual</span></a></span><span>
</span><span id="line-1125"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualifyName
</span><a href="GHC.Utils.Outputable.html#NameNotInScope1"><span class="hs-identifier hs-var">NameNotInScope1</span></a></span><span>
</span><span id="line-1126"></span><span>       </span><span id="local-6989586621681084407"><span class="annot"><span class="annottext">print_unqual :: PrintUnqualified
</span><a href="#local-6989586621681084407"><span class="hs-identifier hs-var hs-var">print_unqual</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Module -&gt; OccName -&gt; QualifyName)
-&gt; (Module -&gt; Bool) -&gt; (Unit -&gt; Bool) -&gt; PrintUnqualified
</span><a href="GHC.Utils.Outputable.html#QueryQualify"><span class="hs-identifier hs-var">QueryQualify</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; OccName -&gt; QualifyName
</span><a href="#local-6989586621681084411"><span class="hs-identifier hs-var">qualifyImportedNames</span></a></span><span>
</span><span id="line-1127"></span><span>                                   </span><span class="annot"><span class="annottext">Module -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#neverQualifyModules"><span class="hs-identifier hs-var">neverQualifyModules</span></a></span><span>
</span><span id="line-1128"></span><span>                                   </span><span class="annot"><span class="annottext">Unit -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#neverQualifyPackages"><span class="hs-identifier hs-var">neverQualifyPackages</span></a></span><span>
</span><span id="line-1129"></span><span>   </span><span class="annot"><span class="annottext">DynFlags -&gt; WarnReason -&gt; Severity -&gt; SrcSpan -&gt; MsgDoc -&gt; IO ()
</span><a href="GHC.Driver.Session.html#putLogMsg"><span class="hs-identifier hs-var">putLogMsg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681084412"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.Flags.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevDump"><span class="hs-identifier hs-var">SevDump</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="GHC.Types.SrcLoc.html#noSrcSpan"><span class="hs-identifier hs-var">noSrcSpan</span></a></span><span>
</span><span id="line-1130"></span><span>      </span><span class="annot"><span class="annottext">(MsgDoc -&gt; IO ()) -&gt; MsgDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#withPprStyle"><span class="hs-identifier hs-var">withPprStyle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrintUnqualified -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkDumpStyle"><span class="hs-identifier hs-var">mkDumpStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621681084407"><span class="hs-identifier hs-var">print_unqual</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprModIface"><span class="hs-identifier hs-var">pprModIface</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084416"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1131"></span><span>
</span><span id="line-1132"></span><span class="hs-comment">-- Show a ModIface but don't display details; suitable for ModIfaces stored in</span><span>
</span><span id="line-1133"></span><span class="hs-comment">-- the EPT.</span><span>
</span><span id="line-1134"></span><span class="annot"><a href="GHC.Iface.Load.html#pprModIfaceSimple"><span class="hs-identifier hs-type">pprModIfaceSimple</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1135"></span><span id="pprModIfaceSimple"><span class="annot"><span class="annottext">pprModIfaceSimple :: ModIface -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprModIfaceSimple"><span class="hs-identifier hs-var hs-var">pprModIfaceSimple</span></a></span></span><span> </span><span id="local-6989586621681084397"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084397"><span class="hs-identifier hs-var">iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084397"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprDeps"><span class="hs-identifier hs-var">pprDeps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084397"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceExport -&gt; MsgDoc) -&gt; [IfaceExport] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceExport -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprExport"><span class="hs-identifier hs-var">pprExport</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceExport]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceExport]
</span><a href="GHC.Driver.Types.html#mi_exports"><span class="hs-identifier hs-var hs-var">mi_exports</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084397"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1136"></span><span>
</span><span id="line-1137"></span><span class="annot"><a href="GHC.Iface.Load.html#pprModIface"><span class="hs-identifier hs-type">pprModIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1138"></span><span class="hs-comment">-- Show a ModIface</span><span>
</span><span id="line-1139"></span><span id="pprModIface"><span class="annot"><span class="annottext">pprModIface :: ModIface -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprModIface"><span class="hs-identifier hs-var hs-var">pprModIface</span></a></span></span><span> </span><span id="local-6989586621681084393"><span class="annot"><span class="annottext">iface :: ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mi_final_exts :: forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; IfaceBackendExts phase
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var">mi_final_exts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084391"><span class="annot"><span class="annottext">IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1140"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;interface&quot;</span></span><span>
</span><span id="line-1141"></span><span>                </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; MsgDoc
</span><a href="#local-6989586621681084390"><span class="hs-identifier hs-var">pp_hsc_src</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; HscSource
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; HscSource
</span><a href="GHC.Driver.Types.html#mi_hsc_src"><span class="hs-identifier hs-var hs-var">mi_hsc_src</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1142"></span><span>                </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Bool
</span><a href="GHC.Driver.Types.html#mi_orphan"><span class="hs-identifier hs-var hs-var">mi_orphan</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[orphan module]&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1143"></span><span>                </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Bool
</span><a href="GHC.Driver.Types.html#mi_finsts"><span class="hs-identifier hs-var hs-var">mi_finsts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[family instance module]&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1144"></span><span>                </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Bool
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Bool
</span><a href="GHC.Driver.Types.html#mi_hpc"><span class="hs-identifier hs-var hs-var">mi_hpc</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[hpc]&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1145"></span><span>                </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#integer"><span class="hs-identifier hs-var">integer</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="GHC.Settings.Constants.html#hiVersion"><span class="hs-identifier hs-var">hiVersion</span></a></span><span>
</span><span id="line-1146"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;interface hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_iface_hash"><span class="hs-identifier hs-var hs-var">mi_iface_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1147"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ABI hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_mod_hash"><span class="hs-identifier hs-var hs-var">mi_mod_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1148"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;export-list hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_exp_hash"><span class="hs-identifier hs-var hs-var">mi_exp_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1149"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;orphan hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_orphan_hash"><span class="hs-identifier hs-var hs-var">mi_orphan_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1150"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;flag hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_flag_hash"><span class="hs-identifier hs-var hs-var">mi_flag_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1151"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;opt_hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_opt_hash"><span class="hs-identifier hs-var hs-var">mi_opt_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1152"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hpc_hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_hpc_hash"><span class="hs-identifier hs-var hs-var">mi_hpc_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1153"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;plugin_hash:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIfaceBackend -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#mi_plugin_hash"><span class="hs-identifier hs-var hs-var">mi_plugin_hash</span></a></span><span> </span><span class="annot"><span class="annottext">ModIfaceBackend
IfaceBackendExts 'ModIfaceFinal
</span><a href="#local-6989586621681084391"><span class="hs-identifier hs-var">exts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1154"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sig of:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Maybe Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Maybe Module
</span><a href="GHC.Driver.Types.html#mi_sig_of"><span class="hs-identifier hs-var hs-var">mi_sig_of</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1155"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;used TH splices:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Bool
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Bool
</span><a href="GHC.Driver.Types.html#mi_used_th"><span class="hs-identifier hs-var hs-var">mi_used_th</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1156"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;where&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1157"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;exports:&quot;</span></span><span>
</span><span id="line-1158"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceExport -&gt; MsgDoc) -&gt; [IfaceExport] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceExport -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprExport"><span class="hs-identifier hs-var">pprExport</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceExport]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceExport]
</span><a href="GHC.Driver.Types.html#mi_exports"><span class="hs-identifier hs-var hs-var">mi_exports</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1159"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Dependencies -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprDeps"><span class="hs-identifier hs-var">pprDeps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Dependencies
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var hs-var">mi_deps</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1160"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Usage -&gt; MsgDoc) -&gt; [Usage] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Usage -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprUsage"><span class="hs-identifier hs-var">pprUsage</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [Usage]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [Usage]
</span><a href="GHC.Driver.Types.html#mi_usages"><span class="hs-identifier hs-var hs-var">mi_usages</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1161"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceAnnotation -&gt; MsgDoc) -&gt; [IfaceAnnotation] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceAnnotation -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprIfaceAnnotation"><span class="hs-identifier hs-var">pprIfaceAnnotation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceAnnotation]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceAnnotation]
</span><a href="GHC.Driver.Types.html#mi_anns"><span class="hs-identifier hs-var hs-var">mi_anns</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1162"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)] -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprFixities"><span class="hs-identifier hs-var">pprFixities</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [(OccName, Fixity)]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [(OccName, Fixity)]
</span><a href="GHC.Driver.Types.html#mi_fixities"><span class="hs-identifier hs-var hs-var">mi_fixities</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1163"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084370"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceDecl -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084369"><span class="hs-identifier hs-var">decl</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084370"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084370"><span class="hs-identifier hs-var">ver</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681084369"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681084369"><span class="hs-identifier hs-var">decl</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceDeclExts 'ModIfaceFinal]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceDeclExts phase]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var hs-var">mi_decls</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1164"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; MsgDoc) -&gt; [IfaceClsInst] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceClsInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceClsInst]
</span><a href="GHC.Driver.Types.html#mi_insts"><span class="hs-identifier hs-var hs-var">mi_insts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1165"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; MsgDoc) -&gt; [IfaceFamInst] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceFamInst]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceFamInst]
</span><a href="GHC.Driver.Types.html#mi_fam_insts"><span class="hs-identifier hs-var hs-var">mi_fam_insts</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1166"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceRule -&gt; MsgDoc) -&gt; [IfaceRule] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceRule]
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; [IfaceRule]
</span><a href="GHC.Driver.Types.html#mi_rules"><span class="hs-identifier hs-var hs-var">mi_rules</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1167"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Warnings -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Warnings
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Warnings
</span><a href="GHC.Driver.Types.html#mi_warns"><span class="hs-identifier hs-var hs-var">mi_warns</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1168"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceTrustInfo -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprTrustInfo"><span class="hs-identifier hs-var">pprTrustInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; IfaceTrustInfo
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; IfaceTrustInfo
</span><a href="GHC.Driver.Types.html#mi_trust"><span class="hs-identifier hs-var hs-var">mi_trust</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1169"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprTrustPkg"><span class="hs-identifier hs-var">pprTrustPkg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Bool
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Bool
</span><a href="GHC.Driver.Types.html#mi_trust_pkg"><span class="hs-identifier hs-var hs-var">mi_trust_pkg</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1170"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IfaceCompleteMatch -&gt; MsgDoc) -&gt; [IfaceCompleteMatch] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceCompleteMatch -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; [IfaceCompleteMatch]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceCompleteMatch]
</span><a href="GHC.Driver.Types.html#mi_complete_sigs"><span class="hs-identifier hs-var hs-var">mi_complete_sigs</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1171"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;module header:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe HsDocString -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; Maybe HsDocString
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; Maybe HsDocString
</span><a href="GHC.Driver.Types.html#mi_doc_hdr"><span class="hs-identifier hs-var hs-var">mi_doc_hdr</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1172"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;declaration docs:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DeclDocMap -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; DeclDocMap
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; DeclDocMap
</span><a href="GHC.Driver.Types.html#mi_decl_docs"><span class="hs-identifier hs-var hs-var">mi_decl_docs</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1173"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;arg docs:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ArgDocMap -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; ArgDocMap
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; ArgDocMap
</span><a href="GHC.Driver.Types.html#mi_arg_docs"><span class="hs-identifier hs-var hs-var">mi_arg_docs</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1174"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;extensible fields:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExtensibleFields -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprExtensibleFields"><span class="hs-identifier hs-var">pprExtensibleFields</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; ExtensibleFields
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; ExtensibleFields
</span><a href="GHC.Driver.Types.html#mi_ext_fields"><span class="hs-identifier hs-var hs-var">mi_ext_fields</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681084393"><span class="hs-identifier hs-var">iface</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1175"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-1176"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1177"></span><span>    </span><span id="local-6989586621681084390"><span class="annot"><span class="annottext">pp_hsc_src :: HscSource -&gt; MsgDoc
</span><a href="#local-6989586621681084390"><span class="hs-identifier hs-var hs-var">pp_hsc_src</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[boot]&quot;</span></span><span>
</span><span id="line-1178"></span><span>    </span><span class="annot"><a href="#local-6989586621681084390"><span class="hs-identifier hs-var">pp_hsc_src</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[hsig]&quot;</span></span><span>
</span><span id="line-1179"></span><span>    </span><span class="annot"><a href="#local-6989586621681084390"><span class="hs-identifier hs-var">pp_hsc_src</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1180"></span><span>
</span><span id="line-1181"></span><span class="hs-comment">{-
When printing export lists, we print like this:
        Avail   f               f
        AvailTC C [C, x, y]     C(x,y)
        AvailTC C [x, y]        C!(x,y)         -- Exporting x, y but not C
-}</span><span>
</span><span id="line-1187"></span><span>
</span><span id="line-1188"></span><span class="annot"><a href="GHC.Iface.Load.html#pprExport"><span class="hs-identifier hs-type">pprExport</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#IfaceExport"><span class="hs-identifier hs-type">IfaceExport</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1189"></span><span id="pprExport"><span class="annot"><span class="annottext">pprExport :: IfaceExport -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprExport"><span class="hs-identifier hs-var hs-var">pprExport</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621681084355"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084355"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084355"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1190"></span><span class="annot"><a href="GHC.Iface.Load.html#pprExport"><span class="hs-identifier hs-var">pprExport</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1191"></span><span class="annot"><a href="GHC.Iface.Load.html#pprExport"><span class="hs-identifier hs-var">pprExport</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621681084353"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084353"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681084352"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084352"><span class="hs-identifier hs-var">ns0</span></a></span></span><span> </span><span id="local-6989586621681084351"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681084351"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1192"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084352"><span class="hs-identifier hs-var">ns0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1193"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621681084350"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084350"><span class="hs-identifier hs-var">n'</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681084349"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084349"><span class="hs-identifier hs-var">ns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084353"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084350"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084353"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [FieldLabel] -&gt; MsgDoc
forall {a} {a}. Outputable a =&gt; [a] -&gt; [FieldLbl a] -&gt; MsgDoc
</span><a href="#local-6989586621681084348"><span class="hs-identifier hs-var">pp_export</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084349"><span class="hs-identifier hs-var">ns</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681084351"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-1194"></span><span>      </span><span class="annot"><span class="annottext">[Name]
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681084353"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#vbar"><span class="hs-identifier hs-var">vbar</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [FieldLabel] -&gt; MsgDoc
forall {a} {a}. Outputable a =&gt; [a] -&gt; [FieldLbl a] -&gt; MsgDoc
</span><a href="#local-6989586621681084348"><span class="hs-identifier hs-var">pp_export</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681084352"><span class="hs-identifier hs-var">ns0</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681084351"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-1195"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1196"></span><span>    </span><span id="local-6989586621681084348"><span class="annot"><span class="annottext">pp_export :: [a] -&gt; [FieldLbl a] -&gt; MsgDoc
</span><a href="#local-6989586621681084348"><span class="hs-identifier hs-var hs-var">pp_export</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1197"></span><span>    </span><span class="annot"><a href="#local-6989586621681084348"><span class="hs-identifier hs-var">pp_export</span></a></span><span> </span><span id="local-6989586621681084342"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681084342"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span id="local-6989586621681084341"><span class="annot"><span class="annottext">[FieldLbl a]
</span><a href="#local-6989586621681084341"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; MsgDoc) -&gt; [a] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681084342"><span class="hs-identifier hs-var">names</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; [MsgDoc] -&gt; [MsgDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLbl a -&gt; MsgDoc) -&gt; [FieldLbl a] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(FastString -&gt; MsgDoc)
-&gt; (FieldLbl a -&gt; FastString) -&gt; FieldLbl a -&gt; MsgDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLbl a -&gt; FastString
forall a. FieldLbl a -&gt; FastString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLbl a]
</span><a href="#local-6989586621681084341"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1198"></span><span>
</span><span id="line-1199"></span><span class="annot"><a href="GHC.Iface.Load.html#pprUsage"><span class="hs-identifier hs-type">pprUsage</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Usage"><span class="hs-identifier hs-type">Usage</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1200"></span><span id="pprUsage"><span class="annot"><span class="annottext">pprUsage :: Usage -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprUsage"><span class="hs-identifier hs-var hs-var">pprUsage</span></a></span></span><span> </span><span id="local-6989586621681084338"><span class="annot"><span class="annottext">usage :: Usage
</span><a href="#local-6989586621681084338"><span class="hs-identifier hs-var">usage</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Driver.Types.html#UsagePackageModule"><span class="hs-identifier hs-type">UsagePackageModule</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>
</span><span id="line-1201"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Usage -&gt; (Usage -&gt; Module) -&gt; MsgDoc
forall a. Outputable a =&gt; Usage -&gt; (Usage -&gt; a) -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprUsageImport"><span class="hs-identifier hs-var">pprUsageImport</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084338"><span class="hs-identifier hs-var">usage</span></a></span><span> </span><span class="annot"><span class="annottext">Usage -&gt; Module
</span><a href="GHC.Driver.Types.html#usg_mod"><span class="hs-identifier hs-var hs-var">usg_mod</span></a></span><span>
</span><span id="line-1202"></span><span class="annot"><a href="GHC.Iface.Load.html#pprUsage"><span class="hs-identifier hs-var">pprUsage</span></a></span><span> </span><span id="local-6989586621681084334"><span class="annot"><span class="annottext">usage :: Usage
</span><a href="#local-6989586621681084334"><span class="hs-identifier hs-var">usage</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Driver.Types.html#UsageHomeModule"><span class="hs-identifier hs-type">UsageHomeModule</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>
</span><span id="line-1203"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Usage -&gt; (Usage -&gt; ModuleName) -&gt; MsgDoc
forall a. Outputable a =&gt; Usage -&gt; (Usage -&gt; a) -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprUsageImport"><span class="hs-identifier hs-var">pprUsageImport</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084334"><span class="hs-identifier hs-var">usage</span></a></span><span> </span><span class="annot"><span class="annottext">Usage -&gt; ModuleName
</span><a href="GHC.Driver.Types.html#usg_mod_name"><span class="hs-identifier hs-var hs-var">usg_mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-1204"></span><span>    </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-1205"></span><span>        </span><span class="annot"><span class="annottext">MsgDoc -&gt; (Fingerprint -&gt; MsgDoc) -&gt; Maybe Fingerprint -&gt; MsgDoc
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681084330"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084330"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;exports: &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084330"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; Maybe Fingerprint
</span><a href="GHC.Driver.Types.html#usg_exports"><span class="hs-identifier hs-var hs-var">usg_exports</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084334"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-1206"></span><span>        </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681084328"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084327"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084328"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681084328"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681084327"><span class="annot"><span class="annottext">Fingerprint
</span><a href="#local-6989586621681084327"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Usage -&gt; [(OccName, Fingerprint)]
</span><a href="GHC.Driver.Types.html#usg_entities"><span class="hs-identifier hs-var hs-var">usg_entities</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084334"><span class="hs-identifier hs-var">usage</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1207"></span><span>        </span><span class="hs-special">)</span><span>
</span><span id="line-1208"></span><span class="annot"><a href="GHC.Iface.Load.html#pprUsage"><span class="hs-identifier hs-var">pprUsage</span></a></span><span> </span><span id="local-6989586621681084325"><span class="annot"><span class="annottext">usage :: Usage
</span><a href="#local-6989586621681084325"><span class="hs-identifier hs-var">usage</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Driver.Types.html#UsageFile"><span class="hs-identifier hs-type">UsageFile</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>
</span><span id="line-1209"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;addDependentFile&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1210"></span><span>          </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#doubleQuotes"><span class="hs-identifier hs-var">doubleQuotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; String
</span><a href="GHC.Driver.Types.html#usg_file_path"><span class="hs-identifier hs-var hs-var">usg_file_path</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084325"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1211"></span><span>          </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_file_hash"><span class="hs-identifier hs-var hs-var">usg_file_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084325"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1212"></span><span class="annot"><a href="GHC.Iface.Load.html#pprUsage"><span class="hs-identifier hs-var">pprUsage</span></a></span><span> </span><span id="local-6989586621681084320"><span class="annot"><span class="annottext">usage :: Usage
</span><a href="#local-6989586621681084320"><span class="hs-identifier hs-var">usage</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Driver.Types.html#UsageMergedRequirement"><span class="hs-identifier hs-type">UsageMergedRequirement</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>
</span><span id="line-1213"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;merged&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; Module
</span><a href="GHC.Driver.Types.html#usg_mod"><span class="hs-identifier hs-var hs-var">usg_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084320"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_mod_hash"><span class="hs-identifier hs-var hs-var">usg_mod_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084320"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1214"></span><span>
</span><span id="line-1215"></span><span id="local-6989586621681085296"><span class="annot"><a href="GHC.Iface.Load.html#pprUsageImport"><span class="hs-identifier hs-type">pprUsageImport</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681085296"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Usage"><span class="hs-identifier hs-type">Usage</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#Usage"><span class="hs-identifier hs-type">Usage</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681085296"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-1216"></span><span id="pprUsageImport"><span class="annot"><span class="annottext">pprUsageImport :: forall a. Outputable a =&gt; Usage -&gt; (Usage -&gt; a) -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprUsageImport"><span class="hs-identifier hs-var hs-var">pprUsageImport</span></a></span></span><span> </span><span id="local-6989586621681084314"><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084314"><span class="hs-identifier hs-var">usage</span></a></span></span><span> </span><span id="local-6989586621681084313"><span class="annot"><span class="annottext">Usage -&gt; a
</span><a href="#local-6989586621681084313"><span class="hs-identifier hs-var">usg_mod'</span></a></span></span><span>
</span><span id="line-1217"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;import&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084312"><span class="hs-keyword hs-var">safe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; a
</span><a href="#local-6989586621681084313"><span class="hs-identifier hs-var">usg_mod'</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084314"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1218"></span><span>                       </span><span class="annot"><span class="annottext">Fingerprint -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Usage -&gt; Fingerprint
</span><a href="GHC.Driver.Types.html#usg_mod_hash"><span class="hs-identifier hs-var hs-var">usg_mod_hash</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084314"><span class="hs-identifier hs-var">usage</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1219"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-1220"></span><span>        </span><span id="local-6989586621681084312"><span class="annot"><span class="annottext">safe :: MsgDoc
</span><a href="#local-6989586621681084312"><span class="hs-keyword hs-var hs-var">safe</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Usage -&gt; Bool
</span><a href="GHC.Driver.Types.html#usg_safe"><span class="hs-identifier hs-var hs-var">usg_safe</span></a></span><span> </span><span class="annot"><span class="annottext">Usage
</span><a href="#local-6989586621681084314"><span class="hs-identifier hs-var">usage</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;safe&quot;</span></span><span>
</span><span id="line-1221"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; -/ &quot;</span></span><span>
</span><span id="line-1222"></span><span>
</span><span id="line-1223"></span><span class="annot"><a href="GHC.Iface.Load.html#pprDeps"><span class="hs-identifier hs-type">pprDeps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Dependencies"><span class="hs-identifier hs-type">Dependencies</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1224"></span><span id="pprDeps"><span class="annot"><span class="annottext">pprDeps :: Dependencies -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprDeps"><span class="hs-identifier hs-var hs-var">pprDeps</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#Deps"><span class="hs-identifier hs-type">Deps</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dep_mods :: Dependencies -&gt; [ModuleNameWithIsBoot]
</span><a href="GHC.Driver.Types.html#dep_mods"><span class="hs-identifier hs-var">dep_mods</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084308"><span class="annot"><span class="annottext">[ModuleNameWithIsBoot]
</span><a href="#local-6989586621681084308"><span class="hs-identifier hs-var">mods</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dep_pkgs :: Dependencies -&gt; [(UnitId, Bool)]
</span><a href="GHC.Driver.Types.html#dep_pkgs"><span class="hs-identifier hs-var">dep_pkgs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084306"><span class="annot"><span class="annottext">[(UnitId, Bool)]
</span><a href="#local-6989586621681084306"><span class="hs-identifier hs-var">pkgs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dep_orphs :: Dependencies -&gt; [Module]
</span><a href="GHC.Driver.Types.html#dep_orphs"><span class="hs-identifier hs-var">dep_orphs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084304"><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084304"><span class="hs-identifier hs-var">orphs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1225"></span><span>                </span><span class="annot"><span class="annottext">dep_finsts :: Dependencies -&gt; [Module]
</span><a href="GHC.Driver.Types.html#dep_finsts"><span class="hs-identifier hs-var">dep_finsts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084302"><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084302"><span class="hs-identifier hs-var">finsts</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1226"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;module dependencies:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleNameWithIsBoot -&gt; MsgDoc)
-&gt; [ModuleNameWithIsBoot] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleNameWithIsBoot -&gt; MsgDoc
forall {a}. Outputable a =&gt; GenWithIsBoot a -&gt; MsgDoc
</span><a href="#local-6989586621681084300"><span class="hs-identifier hs-var">ppr_mod</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleNameWithIsBoot]
</span><a href="#local-6989586621681084308"><span class="hs-identifier hs-var">mods</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1227"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;package dependencies:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((UnitId, Bool) -&gt; MsgDoc) -&gt; [(UnitId, Bool)] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(UnitId, Bool) -&gt; MsgDoc
forall {a}. Outputable a =&gt; (a, Bool) -&gt; MsgDoc
</span><a href="#local-6989586621681084299"><span class="hs-identifier hs-var">ppr_pkg</span></a></span><span> </span><span class="annot"><span class="annottext">[(UnitId, Bool)]
</span><a href="#local-6989586621681084306"><span class="hs-identifier hs-var">pkgs</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1228"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;orphans:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Module -&gt; MsgDoc) -&gt; [Module] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084304"><span class="hs-identifier hs-var">orphs</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1229"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;family instance modules:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Module -&gt; MsgDoc) -&gt; [Module] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Module]
</span><a href="#local-6989586621681084302"><span class="hs-identifier hs-var">finsts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1230"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-1231"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1232"></span><span>    </span><span id="local-6989586621681084300"><span class="annot"><span class="annottext">ppr_mod :: GenWithIsBoot a -&gt; MsgDoc
</span><a href="#local-6989586621681084300"><span class="hs-identifier hs-var hs-var">ppr_mod</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Types.html#GWIB"><span class="hs-identifier hs-type">GWIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">gwib_mod :: forall mod. GenWithIsBoot mod -&gt; mod
</span><a href="GHC.Unit.Types.html#gwib_mod"><span class="hs-identifier hs-var">gwib_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084295"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084295"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">gwib_isBoot :: forall mod. GenWithIsBoot mod -&gt; IsBootInterface
</span><a href="GHC.Unit.Types.html#gwib_isBoot"><span class="hs-identifier hs-var">gwib_isBoot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084294"><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084294"><span class="hs-identifier hs-var">boot</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084295"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface -&gt; MsgDoc
</span><a href="#local-6989586621681084293"><span class="hs-identifier hs-var">ppr_boot</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="#local-6989586621681084294"><span class="hs-identifier hs-var">boot</span></a></span><span>
</span><span id="line-1233"></span><span>    </span><span id="local-6989586621681084299"><span class="annot"><span class="annottext">ppr_pkg :: (a, Bool) -&gt; MsgDoc
</span><a href="#local-6989586621681084299"><span class="hs-identifier hs-var hs-var">ppr_pkg</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084290"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084290"><span class="hs-identifier hs-var">pkg</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681084289"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084289"><span class="hs-identifier hs-var">trust_req</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084290"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-1234"></span><span>                               </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084289"><span class="hs-identifier hs-var">trust_req</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;*&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1235"></span><span>    </span><span id="local-6989586621681084293"><span class="annot"><span class="annottext">ppr_boot :: IsBootInterface -&gt; MsgDoc
</span><a href="#local-6989586621681084293"><span class="hs-identifier hs-var hs-var">ppr_boot</span></a></span></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#IsBoot"><span class="hs-identifier hs-var">IsBoot</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[boot]&quot;</span></span><span>
</span><span id="line-1236"></span><span>    </span><span class="annot"><a href="#local-6989586621681084293"><span class="hs-identifier hs-var">ppr_boot</span></a></span><span> </span><span class="annot"><span class="annottext">IsBootInterface
</span><a href="GHC.Unit.Types.html#NotBoot"><span class="hs-identifier hs-var">NotBoot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1237"></span><span>
</span><span id="line-1238"></span><span class="annot"><a href="GHC.Iface.Load.html#pprFixities"><span class="hs-identifier hs-type">pprFixities</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1239"></span><span id="pprFixities"><span class="annot"><span class="annottext">pprFixities :: [(OccName, Fixity)] -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprFixities"><span class="hs-identifier hs-var hs-var">pprFixities</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1240"></span><span class="annot"><a href="GHC.Iface.Load.html#pprFixities"><span class="hs-identifier hs-var">pprFixities</span></a></span><span> </span><span id="local-6989586621681084288"><span class="annot"><span class="annottext">[(OccName, Fixity)]
</span><a href="#local-6989586621681084288"><span class="hs-identifier hs-var">fixes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fixities&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">((OccName, Fixity) -&gt; MsgDoc) -&gt; [(OccName, Fixity)] -&gt; MsgDoc
forall a. (a -&gt; MsgDoc) -&gt; [a] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#pprWithCommas"><span class="hs-identifier hs-var">pprWithCommas</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName, Fixity) -&gt; MsgDoc
forall {a} {a}. (Outputable a, Outputable a) =&gt; (a, a) -&gt; MsgDoc
</span><a href="#local-6989586621681084286"><span class="hs-identifier hs-var">pprFix</span></a></span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)]
</span><a href="#local-6989586621681084288"><span class="hs-identifier hs-var">fixes</span></a></span><span>
</span><span id="line-1241"></span><span>                  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1242"></span><span>                    </span><span id="local-6989586621681084286"><span class="annot"><span class="annottext">pprFix :: (a, a) -&gt; MsgDoc
</span><a href="#local-6989586621681084286"><span class="hs-identifier hs-var hs-var">pprFix</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084281"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084281"><span class="hs-identifier hs-var">occ</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681084280"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084280"><span class="hs-identifier hs-var">fix</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084280"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084281"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-1243"></span><span>
</span><span id="line-1244"></span><span class="annot"><a href="GHC.Iface.Load.html#pprTrustInfo"><span class="hs-identifier hs-type">pprTrustInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#IfaceTrustInfo"><span class="hs-identifier hs-type">IfaceTrustInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1245"></span><span id="pprTrustInfo"><span class="annot"><span class="annottext">pprTrustInfo :: IfaceTrustInfo -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprTrustInfo"><span class="hs-identifier hs-var hs-var">pprTrustInfo</span></a></span></span><span> </span><span id="local-6989586621681084279"><span class="annot"><span class="annottext">IfaceTrustInfo
</span><a href="#local-6989586621681084279"><span class="hs-identifier hs-var">trust</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;trusted:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTrustInfo -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTrustInfo
</span><a href="#local-6989586621681084279"><span class="hs-identifier hs-var">trust</span></a></span><span>
</span><span id="line-1246"></span><span>
</span><span id="line-1247"></span><span class="annot"><a href="GHC.Iface.Load.html#pprTrustPkg"><span class="hs-identifier hs-type">pprTrustPkg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1248"></span><span id="pprTrustPkg"><span class="annot"><span class="annottext">pprTrustPkg :: Bool -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprTrustPkg"><span class="hs-identifier hs-var hs-var">pprTrustPkg</span></a></span></span><span> </span><span id="local-6989586621681084278"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084278"><span class="hs-identifier hs-var">tpkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;require own pkg trusted:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681084278"><span class="hs-identifier hs-var">tpkg</span></a></span><span>
</span><span id="line-1249"></span><span>
</span><span id="line-1250"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681084275"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Warnings"><span class="hs-identifier hs-type">Warnings</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1251"></span><span>    </span><span id="local-6989586621681084273"><span class="annot"><span class="annottext">ppr :: Warnings -&gt; MsgDoc
</span><a href="#local-6989586621681084273"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Warnings -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprWarns"><span class="hs-identifier hs-var">pprWarns</span></a></span><span>
</span><span id="line-1252"></span><span>
</span><span id="line-1253"></span><span class="annot"><a href="GHC.Iface.Load.html#pprWarns"><span class="hs-identifier hs-type">pprWarns</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Warnings"><span class="hs-identifier hs-type">Warnings</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1254"></span><span id="pprWarns"><span class="annot"><span class="annottext">pprWarns :: Warnings -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprWarns"><span class="hs-identifier hs-var hs-var">pprWarns</span></a></span></span><span> </span><span class="annot"><span class="annottext">Warnings
</span><a href="GHC.Driver.Types.html#NoWarnings"><span class="hs-identifier hs-var">NoWarnings</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-1255"></span><span class="annot"><a href="GHC.Iface.Load.html#pprWarns"><span class="hs-identifier hs-var">pprWarns</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#WarnAll"><span class="hs-identifier hs-type">WarnAll</span></a></span><span> </span><span id="local-6989586621681084269"><span class="annot"><span class="annottext">WarningTxt
</span><a href="#local-6989586621681084269"><span class="hs-identifier hs-var">txt</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Warn all&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">WarningTxt -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">WarningTxt
</span><a href="#local-6989586621681084269"><span class="hs-identifier hs-var">txt</span></a></span><span>
</span><span id="line-1256"></span><span class="annot"><a href="GHC.Iface.Load.html#pprWarns"><span class="hs-identifier hs-var">pprWarns</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#WarnSome"><span class="hs-identifier hs-type">WarnSome</span></a></span><span> </span><span id="local-6989586621681084267"><span class="annot"><span class="annottext">[(OccName, WarningTxt)]
</span><a href="#local-6989586621681084267"><span class="hs-identifier hs-var">prs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Warnings&quot;</span></span><span>
</span><span id="line-1257"></span><span>                        </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((OccName, WarningTxt) -&gt; MsgDoc)
-&gt; [(OccName, WarningTxt)] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName, WarningTxt) -&gt; MsgDoc
forall {a} {a}. (Outputable a, Outputable a) =&gt; (a, a) -&gt; MsgDoc
</span><a href="#local-6989586621681084266"><span class="hs-identifier hs-var">pprWarning</span></a></span><span> </span><span class="annot"><span class="annottext">[(OccName, WarningTxt)]
</span><a href="#local-6989586621681084267"><span class="hs-identifier hs-var">prs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1258"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681084266"><span class="annot"><span class="annottext">pprWarning :: (a, a) -&gt; MsgDoc
</span><a href="#local-6989586621681084266"><span class="hs-identifier hs-var hs-var">pprWarning</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084261"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084261"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681084260"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084260"><span class="hs-identifier hs-var">txt</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084261"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681084260"><span class="hs-identifier hs-var">txt</span></a></span><span>
</span><span id="line-1259"></span><span>
</span><span id="line-1260"></span><span class="annot"><a href="GHC.Iface.Load.html#pprIfaceAnnotation"><span class="hs-identifier hs-type">pprIfaceAnnotation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAnnotation"><span class="hs-identifier hs-type">IfaceAnnotation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1261"></span><span id="pprIfaceAnnotation"><span class="annot"><span class="annottext">pprIfaceAnnotation :: IfaceAnnotation -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprIfaceAnnotation"><span class="hs-identifier hs-var hs-var">pprIfaceAnnotation</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAnnotation"><span class="hs-identifier hs-type">IfaceAnnotation</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifAnnotatedTarget :: IfaceAnnotation -&gt; IfaceAnnTarget
</span><a href="GHC.Iface.Syntax.html#ifAnnotatedTarget"><span class="hs-identifier hs-var">ifAnnotatedTarget</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084257"><span class="annot"><span class="annottext">IfaceAnnTarget
</span><a href="#local-6989586621681084257"><span class="hs-identifier hs-var">target</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifAnnotatedValue :: IfaceAnnotation -&gt; AnnPayload
</span><a href="GHC.Iface.Syntax.html#ifAnnotatedValue"><span class="hs-identifier hs-var">ifAnnotatedValue</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681084255"><span class="annot"><span class="annottext">AnnPayload
</span><a href="#local-6989586621681084255"><span class="hs-identifier hs-var">serialized</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1262"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceAnnTarget -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceAnnTarget
</span><a href="#local-6989586621681084257"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;annotated by&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">AnnPayload -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">AnnPayload
</span><a href="#local-6989586621681084255"><span class="hs-identifier hs-var">serialized</span></a></span><span>
</span><span id="line-1263"></span><span>
</span><span id="line-1264"></span><span class="annot"><a href="GHC.Iface.Load.html#pprExtensibleFields"><span class="hs-identifier hs-type">pprExtensibleFields</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ExtensibleFields"><span class="hs-identifier hs-type">ExtensibleFields</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1265"></span><span id="pprExtensibleFields"><span class="annot"><span class="annottext">pprExtensibleFields :: ExtensibleFields -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#pprExtensibleFields"><span class="hs-identifier hs-var hs-var">pprExtensibleFields</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ExtensibleFields"><span class="hs-identifier hs-type">ExtensibleFields</span></a></span><span> </span><span id="local-6989586621681084253"><span class="annot"><span class="annottext">Map String BinData
</span><a href="#local-6989586621681084253"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([MsgDoc] -&gt; MsgDoc)
-&gt; ([(String, BinData)] -&gt; [MsgDoc])
-&gt; [(String, BinData)]
-&gt; MsgDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((String, BinData) -&gt; MsgDoc) -&gt; [(String, BinData)] -&gt; [MsgDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(String, BinData) -&gt; MsgDoc
</span><a href="#local-6989586621681084252"><span class="hs-identifier hs-var">pprField</span></a></span><span> </span><span class="annot"><span class="annottext">([(String, BinData)] -&gt; MsgDoc) -&gt; [(String, BinData)] -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Map String BinData -&gt; [(String, BinData)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">toList</span></a></span><span> </span><span class="annot"><span class="annottext">Map String BinData
</span><a href="#local-6989586621681084253"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-1266"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1267"></span><span>    </span><span id="local-6989586621681084252"><span class="annot"><span class="annottext">pprField :: (String, BinData) -&gt; MsgDoc
</span><a href="#local-6989586621681084252"><span class="hs-identifier hs-var hs-var">pprField</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681084249"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084249"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Binary.html#BinData"><span class="hs-identifier hs-type">BinData</span></a></span><span> </span><span id="local-6989586621681084247"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681084247"><span class="hs-identifier hs-var">size</span></a></span></span><span> </span><span id="local-6989586621681084246"><span class="annot"><span class="annottext">BinArray
</span><a href="#local-6989586621681084246"><span class="hs-identifier hs-var">_data</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084249"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681084247"><span class="hs-identifier hs-var">size</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bytes&quot;</span></span><span>
</span><span id="line-1268"></span><span>
</span><span id="line-1269"></span><span class="hs-comment">{-
*********************************************************
*                                                       *
\subsection{Errors}
*                                                       *
*********************************************************
-}</span><span>
</span><span id="line-1276"></span><span>
</span><span id="line-1277"></span><span class="annot"><a href="GHC.Iface.Load.html#badIfaceFile"><span class="hs-identifier hs-type">badIfaceFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1278"></span><span id="badIfaceFile"><span class="annot"><span class="annottext">badIfaceFile :: String -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#badIfaceFile"><span class="hs-identifier hs-var hs-var">badIfaceFile</span></a></span></span><span> </span><span id="local-6989586621681084245"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084245"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span id="local-6989586621681084244"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084244"><span class="hs-identifier hs-var">err</span></a></span></span><span>
</span><span id="line-1279"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Bad interface file:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084245"><span class="hs-identifier hs-var">file</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1280"></span><span>          </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681084244"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1281"></span><span>
</span><span id="line-1282"></span><span class="annot"><a href="GHC.Iface.Load.html#hiModuleNameMismatchWarn"><span class="hs-identifier hs-type">hiModuleNameMismatchWarn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#MsgDoc"><span class="hs-identifier hs-type">MsgDoc</span></a></span><span>
</span><span id="line-1283"></span><span id="hiModuleNameMismatchWarn"><span class="annot"><span class="annottext">hiModuleNameMismatchWarn :: Module -&gt; Module -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#hiModuleNameMismatchWarn"><span class="hs-identifier hs-var hs-var">hiModuleNameMismatchWarn</span></a></span></span><span> </span><span id="local-6989586621681084243"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084243"><span class="hs-identifier hs-var">requested_mod</span></a></span></span><span> </span><span id="local-6989586621681084242"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084242"><span class="hs-identifier hs-var">read_mod</span></a></span></span><span>
</span><span id="line-1284"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084243"><span class="hs-identifier hs-var">requested_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084242"><span class="hs-identifier hs-var">read_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1285"></span><span>    </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Interface file contains module&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084242"><span class="hs-identifier hs-var">read_mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1286"></span><span>         </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;but we were expecting module&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084243"><span class="hs-identifier hs-var">requested_mod</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1287"></span><span>         </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Probable cause: the source code which generated interface file&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1288"></span><span>             </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;has an incompatible module name&quot;</span></span><span>
</span><span id="line-1289"></span><span>            </span><span class="hs-special">]</span><span>
</span><span id="line-1290"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-1291"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1292"></span><span>  </span><span class="hs-comment">-- ToDo: This will fail to have enough qualification when the package IDs</span><span>
</span><span id="line-1293"></span><span>  </span><span class="hs-comment">-- are the same</span><span>
</span><span id="line-1294"></span><span>  </span><span class="annot"><span class="annottext">PprStyle -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#withPprStyle"><span class="hs-identifier hs-var">withPprStyle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrintUnqualified -&gt; Depth -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkUserStyle"><span class="hs-identifier hs-var">mkUserStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="GHC.Utils.Outputable.html#alwaysQualify"><span class="hs-identifier hs-var">alwaysQualify</span></a></span><span> </span><span class="annot"><span class="annottext">Depth
</span><a href="GHC.Utils.Outputable.html#AllTheWay"><span class="hs-identifier hs-var">AllTheWay</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; MsgDoc) -&gt; MsgDoc -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1295"></span><span>    </span><span class="hs-comment">-- we want the Modules below to be qualified with package names,</span><span>
</span><span id="line-1296"></span><span>    </span><span class="hs-comment">-- so reset the PrintUnqualified setting.</span><span>
</span><span id="line-1297"></span><span>    </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Something is amiss; requested module &quot;</span></span><span>
</span><span id="line-1298"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084243"><span class="hs-identifier hs-var">requested_mod</span></a></span><span>
</span><span id="line-1299"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;differs from name found in the interface file&quot;</span></span><span>
</span><span id="line-1300"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Module -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681084242"><span class="hs-identifier hs-var">read_mod</span></a></span><span>
</span><span id="line-1301"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;if these names look the same, try again with -dppr-debug&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1302"></span><span>         </span><span class="hs-special">]</span><span>
</span><span id="line-1303"></span><span>
</span><span id="line-1304"></span><span class="annot"><a href="GHC.Iface.Load.html#homeModError"><span class="hs-identifier hs-type">homeModError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#InstalledModule"><span class="hs-identifier hs-type">InstalledModule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1305"></span><span class="hs-comment">-- See Note [Home module load error]</span><span>
</span><span id="line-1306"></span><span id="homeModError"><span class="annot"><span class="annottext">homeModError :: InstalledModule -&gt; ModLocation -&gt; MsgDoc
</span><a href="GHC.Iface.Load.html#homeModError"><span class="hs-identifier hs-var hs-var">homeModError</span></a></span></span><span> </span><span id="local-6989586621681084237"><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084237"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621681084236"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681084236"><span class="hs-identifier hs-var">location</span></a></span></span><span>
</span><span id="line-1307"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;attempting to use module &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstalledModule -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledModule
</span><a href="#local-6989586621681084237"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1308"></span><span>    </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ModLocation -&gt; Maybe String
</span><a href="GHC.Unit.Module.Location.html#ml_hs_file"><span class="hs-identifier hs-var hs-var">ml_hs_file</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681084236"><span class="hs-identifier hs-var">location</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1309"></span><span>           </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681084234"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084234"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#space"><span class="hs-identifier hs-var">space</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681084234"><span class="hs-identifier hs-var">file</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1310"></span><span>           </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1311"></span><span>    </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;which is not loaded&quot;</span></span><span>
</span><span id="line-1312"></span></pre></body></html>